Functions

 

You can use functions (for example, string functions) to modify the values when the value of a source element cannot be directly linked to a target element.

This section describes how to:

Use functions on links

To use a string function:

  1. Select the function (for example, Substring) from the palette on the right.
  2. Drag a source element and drop it on a target element.
  3. To use another input for the function, drag the element and drop it on the function.

When you hover over the function box of a function that allows more than one parameter, a parameter bar is displayed and you can drop the element on a specific parameter, for example:

Visual MapperString function example

If you use a function with an unbound parameter list (for example, Concat) the parameter bar includes a plus sign. You can drop the element on the plus sign to add it as a new parameter for the function, for example:

Concat example

You can change the order of the parameter values by reconnecting the lines. You can drag the end of the line to reconnect, and drop it on a different parameter.

For more information on the supported string functions, see Supported functions.

Create a string concat function

There are two options you can use to create a concat function:

  • Option 1: Drag one or more source elements and drop them to an existing link box. The order of the parameters is dependent on the selection source elements order, for example:
    Visual Mapper screen with drag source element for the concat function

  • Option 2: Select at least two source elements and drag and drop them to a target element, for example:

Visual Mapper screen selecting two source elements to concat

To switch between functions, select a function from the palette and drop it on existing function box. You can also select another function from the context menu.

To add links for all parameters of a function, select multiple source elements and drag and drop them on and existing function box. The inputs are appended until the number of parameters limit is reached.

Note   If you drop a source element over a function box, the source element link is considered the first unconfigured parameter, if one exists.

Apply the date and time function

To apply the date and time function:

  1. Select the desired formatting function (for example, Format-date) from the palette on the right.
  2. Drag a source element and drop it on a target element.

Visual Mapper Edit "format" value for "format-date" function sample screen

To choose a specific format for input:

  1. Select the created link.
  2. Select Edit from context menu and edit the format parameter from the Edit function parameters dialog.
  3. Choose a pre-defined format or enter your own pattern.

For more information on the supported format functions, see Format functions.

Apply the format-number function

The format-number function converts the given number into a string.

Note   For a full list of supported format functions and input types, see Format functions.

To use the format-number function:

  1. Select the Format-number function from the palette on the rights.
  2. Drag a source element and drop it on a target element.

Visual Mapper Format Function example screen

To choose a specific format for a number:

  1. Select the format-number link.
  2. Select Edit from context menu and edit the format parameter from the Edit function parameters dialog.
  3. Choose a pre-defined pattern or enter your own pattern:

    Visual Mapper example of Edit format function parameter
Note   If your pattern is invalid, an error message is displayed in the output string.

Related Links