Question

In my source schema I have an optional element, in my destination I have a required element.

If the source exists I have to map it directly to the destination, otherwise I need to generate a GUID and assign it to the destination. How do I do this?

Was it helpful?

Solution

If you're not using xslt for your mapping:

Test for existence using the "Logical Existence" functoid -> "Logical Not" functoid -> "Value Mapping" functoid. This checks to see if the node in the input does not exist, if it does not, then use the value mapping to set the value. You can put a hard coded value in the value mapper directly, or hook it to some other input. You may need to do a bit more work if your input node exists but is blank.

There are lots of examples on the internet.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top