Jeremy
Jeremy

Reputation: 46440

Map optional element to required element

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?

Upvotes: 0

Views: 2171

Answers (1)

Jay
Jay

Reputation: 14481

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.

Upvotes: 3

Related Questions