The if and choose statements are two ways to create conditions. If statements allow you to specify a single condition. Choose/when/otherwise statements allow you to specify multiple conditions, similar to if/then/else.
To create conditional mapping:
- Drag a source to a target to create a mapping.
- Click the target node to launch the Mapping Builder.
- Click Mapping Components.
You can either find or browse for the function.
- Drag the if or choose function onto the target tag statement.
The statement appears as a parent of the target tag. A new empty row is created with the text Drag and Drop or Type here....
- Click Source. Then do one of the following:
- Drag a source element onto the empty row to use a source element as the basis for the test condition.
- Select an XPath function as the basis for the test condition.
- Use a literal as the basis for the test condition by typing in the empty row.
- For choose, you may specify additional when and otherwise conditions.
- Right-click the choose statement and select Insert Child.
A new empty row is displayed with the text Drag and Drop or Type here…
- Drag and drop when or otherwise from the Mapping Components list.
- Click Save.