Creating Conditional Mappings

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:
  1. Drag a source to a target to create a mapping.
  2. Click the target node to launch the Mapping Builder.
  3. Click Mapping Components.
    You can either find or browse for the function.
  4. 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....
  5. 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.
  6. For choose, you may specify additional when and otherwise conditions.
    1. Right-click the choose statement and select Insert Child.
      A new empty row is displayed with the text Drag and Drop or Type hereā€¦
    2. Drag and drop when or otherwise from the Mapping Components list.
  7. Click Save.