User bio
404 bio not found
Member since Dec 11, 2015
Replies:

Hi Victoria and thank you for taking the time to reply.

I do something similar today and it gives an empty tag anyway.

The condition is that if a certain tag has no children, none of that tag should be presented-

Example:

<Parent>
      .......
      .......
     <Child>
       ...
     </Child>
<Parent>

Above XML is to be presented.

<Parent>
     .........
</Parent

Above XML should NOT be presented.

I try in the transformation:
If source.Parent.(k1).Child.(1)=""
 <False>
  Do the map
</False>


I first expected a null exception if the Child tag didn't exist but HC seems to be able to handle that.

I also tried changing the condition to your suggestion:

If ..Length(source.Parent.(k1).Child.(1)>1)

<True>
   .......
</True>

But it gave the same result unfortunately.

Sincerely, Michael

Hello again

Previous experience that I have (with health connect), underlying tags can be mandatory to a tag that is optional. So only if the parent-tag is included, the children that are mandatory must be included.

I tried with:
<xs:element name="Analysis" maxOccurs="unbounded" minOccurs="0">
and it could pass the transformation but still had no effect.

Right now I remove the tag afterwards using objectscript. It does work, but is still a more cumbersome way to solve it. It would be best if it could be removed already in the transformation.

Sincerely, Michael

Hello and thank you for taking the time to reply.
Yes, I have imported the XSD file into the namespace and it is mandatory as you ask (see image).
In the XSD file itself it is stated:
<xs:element name="Analysis" maxOccurs="unbounded">.

I tried changing to:
<xs:element name="Analysis" minOccurs="0"/>
but it gave error in the transformation.

 

Certifications & Credly badges:
Michael has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Michael has no followers yet.
Following:
Michael has not followed anybody yet.