Adding an If function
You can only drop an If function on a mapping, or on another Loop or If function where the latter yields a nested If function.
See Function elements overview.
- Double-click a mapping to open it in the Mapper Editor.
- From the Core Functions pane on the Palette tab, select and drag If function in your mapping.
- Drag and drop the circular function element to the space between the input and output document trees.
-
Connect a controlling link for your If function.
You can control an If function by using an input document element or a UBJ function.
This table shows how the source element type of the link that controls the If function defines the If condition:
Condition Possible If function The source is an input document element, single or repeating -
Execute once if the elements exists
(If_TRUE, Execute ONCE if element exists)
-
Execute once if the element does not exist
(If_FALSE, Execute ONCE if no element exists)
The source is a UBJ function -
Execute once if the function returns true
(If_TRUE, Execute ONCE if function is TRUE)
-
Execute once if the function returns false (If_FALSE, Execute ONCE if function is FALSE)
-
- Right-click an If function and select Properties.
-
Select the condition for your If function.
Note: Expand the Condition property to select the
IfExecution
value. -
Specify the information for your parameter properties.
- Condition
-
See If conditions in the table.
- Description
-
Provide a brief description.
- Name
-
Specify a name.
The default value is If.
-
Select File > Save to save the If function into your mapping.
Note: If you select a condition so that you can run the If function multiple times, then the If function becomes a Loop function.