Adding a Collector function in a Mapping

A Collector function behaves like a UVJ function with regard to input parameters. Input document elements and attributes, preceding functions’ output parameters, and global variables and constants can be linked to collector function. Collector function stores your altered data into memory, so it can be sorted before the outmost restructure loop starts.

This list outlines the differences of a Collector function from a UVJ function:

  • A collector function can only be created in a loop.

  • There must be only one Collector function within a loop, usually placed last in the loop's sequence.

  • Output parameters can only be linked to a following Restructure widget input parameters.

Note: When an output parameter is dragged and dropped to a Restructure function, an input parameter with the same name is automatically created for the Restructure function. The link is dashed to indicate a "reference link".

Use this procedure to add a Collector function in a mapping. Repeat this procedure for nested collector loops, if necessary.

  1. Double-click a mapping to open it in the Mapper Editor.
  2. In the Core Functions pane, select Collector.

    Drag and drop Collector in the space inside a loop to add a Collector function.

    Note: When connecting input elements, you can drop elements only where it is acceptable.
  3. Add input parameters to receive input data.

    You can directly use data from the input document, data from preceding functions, or data from global variables or constants. Input parameters always have the data type String.

    A corresponding output parameter is automatically created. The icon for Collector output parameters is dashed to indicate "reference parameters".

  4. Link the output parameters to Restructure functions.

    Click and drag an output parameter to a following Restructure function. The created link is dashed to indicate "reference link". No data is actually read in runtime.

  5. Save the function in the Mapping Editor.