If Instruction

This section describes how to:

You can use the if instruction on a link to check if a source element is not empty before mapping a source element to a target element. The if instruction has two parameters: the condition and the input. The condition is set to validate that the selected source element is not empty before mapping the source element to the target element.

Apply the if instruction to a simple link

To apply the if instruction, select the If icon from the palette on the right, then drag a source element and drop it on a target element. You can change the element, that should be checked (the condition) before you execute the map, by reconnecting the link or by editing the condition parameter in the Properties view. In the Properties view you can also edit the value of a parameter, and see the generated XSL expression.

Note   You can configure complex expressions for conditions in the parameter dialog; although, there is no validation of the input and the existing links will be removed from UI.

Visual Mapper Apply the if instruction to a sample link example

Visual Mapper screen of IF example

Apply the if instruction to a structural link

To apply the if instruction to a structural link, select the If icon from the palette and drop it on a structural link or select it from the context menu of the link.

You can change the element (the condition should be checked before you execute the map) by reconnecting the link or by editing the condition parameter in the Properties view. Also, in the Properties view, you can edit the value of a parameter, and see the generated XSL expression. See Properties view.

In following example, the account structure is mapped only if the currency is EUR:

Visual Mapper if instruction to a structural link example

 

 

Related Links