Adding an If function

An If function can only be dropped on a mapping, or on another Loop or If function where the latter yields a nested If function. See the topic on "Function elements overview".

Note: When connecting elements, you can drop elements only where it is acceptable.
  1. Double-click a mapping to open it in the Mapper Editor.
  2. From the Core Functions pane in the Palette tab, select and drag If function in your mapping.
  3. Drag and drop the circular function element to the space between the input and output document trees.
  4. Connect a controlling link for your If function.

    An If function can be controlled by 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:

    If condition Details
    If source is an input document element, single or repeating, then the If function may:
    • 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)

    If source is a UBJ function, then the If function may:
    • 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)

  5. Right-click an If function and select Properties....

    The Properties tab is displayed.

  6. Select the condition for your If function.
    Note: You need to expand the Condition property to be able to select the IfExecution value.
  7. Specify this information for your parameter properties.
    Condition

    See If conditions in the table above.

    Description

    Specify a brief description.

    Name

    Specify a name.

    Default value: If

  8. Select File > Save to save the If function into your mapping.
    Note: If you select a condition so that the If function will execute multiple times, the If function becomes a Loop function.