Using the Output Node Mapping Builder

In this section:

The Output Node Mapping Builder is a tool available in Transformer as part of the Mapping Builder facility. It allows you to construct an output node using various methods and formulas implemented in iWay Transformer as functions. You can access the pre-defined functions and the custom functions that you defined, or build the statement containing several functions if needed.

In Transformer, the pre-defined functions are subdivided into the following categories:


Top of page

x
Setting Function Parameters

After selecting a specific function, typically you will need to define the set of parameters associated with it. The number and the names of the parameters for the particular function can be determined in either of the following ways:

For more details on the parameters to specify for each particular function, see Pre-Defined Functions for a complete reference. If dealing with custom functions, you may consult the author of the function.

Generally, the functions can take four types of values as their parameters:

A function of a parameter can take the value of a specified input node. For information on how to set an input node, see How to Set an Input Node.

You can nest functions within functions, which means the output result of a certain function can serve as the input parameter for another function. For more details, see How to Nest Functions.

You can also set a specific invariable value as a constant function parameter. For information on how to set a constant value, see How to Set a Constant Value for a Function.

Another option for a function parameter type is an expression which is a basic combination of operators, input nodes, and/or constants. For information on how to set an expression, see How to Set an Expression for a Function.


Top of page

x
Pre-defined Functions

The Output Node Mapping Builder enables you to set the output node values using a combination of functions and/or input nodes. Both custom and pre-defined functions can be utilized. When specifying a function through the Output Node Mapping Builder, you must know what the specific function does and how to specify the parameters for it. For more information, see Pre-Defined Functions.



x
Procedure: How to Open the Output Node Mapping Builder

The following image shows the Mapping Builder interface in Transformer.

To open the Output Node Mapping Builder:

  1. In the Mapping Values pane of the Mappings tab, select an output node.
  2. Click the ellipsis button .

    The Output Node Mapping Builder displays as shown in the following image.

    The left pane of the Output Node Mapping Builder dialog box provides you with the option of switching between the following areas:

    • Functions
    • Input (selected by default)
    • Global Constants
    • JDBC Data Source
    • @REPLACE Input
    • @REPLACE JDBC

    The Functions and Input panes are available by default. The remaining panes are only available if specific values are configured in the corresponding sections of the Project Properties dialog box. For example, if a global constant is configured using the Project Properties dialog box, the Global Constants pane would be enabled in the Output Node Mapping Builder.

    This feature allows you to drag and drop any available configuration that was specified using the Project Properties dialog box into the workspace area of the Output Node Mapping Builder. You can switch between the available panes by clicking on the corresponding button, for example, Global Constants, JDBC Data Source, and so on. You can access the Project Properties dialog box directly from the Output Node Mapping Builder, by clicking the View Project Properties button on the lower-left corner, as shown in the following image.

    Note: In the Output Node Mapping Builder, when you select a link in the tree structure, the highlighted link changes to red, which indicates that it is selected.



x
Procedure: How to Select a Function

To select a function:

  1. From the Category drop-down list in the Functions pane of the Output Node Mapping Builder, select the function category you want to use, for example, String.

    For a list of function categories, see Using the Output Node Mapping Builder.

    The following image shows String Functions selected in the Category drop-down list, which is located in the Functions pane.

    Optionally, you can skip to step 2 and select your function from the whole list of available functions.

  2. Select the specific function you want to use, for example, @CONCAT(string, string, string), and drag it into the workspace area of the Output Node Mapping Builder as shown below:

    Note: You can drag and drop functions above or below the existing mapping tree in the workspace area as needed to create a combination of output values.

    The function you choose becomes your working function.

  3. To replace the working function, drag a new function on the workspace and drop it directly onto the working function.


x
Procedure: How to Set an Input Node

To set an input node as the value for a function parameter:

  1. Select an input node from the Input document tree area of the Output Node Mapping Builder.

  2. Drag the input node onto the appropriate parameter in the workspace area of the Output Node Mapping Builder.

    An alternate way to perform this task is to use Set Selected Input option from the context menu which appears when you right-click the parameter in the workspace area.

    Note: Another method for editing the mapping formula of your node is to type it directly in the preview area located on the lower-right corner of the Output Node Mapping Builder window and press Enter. The tree structure will be refreshed. However, this option is recommended for advanced users only. Using the drag and drop interface instead is strongly encouraged.

    If you decide to type the mapping formula manually and it is incorrect, an Invalid signature error message is generated.



x
Procedure: How to Nest Functions

To specify another function as a parameter for your working function:

  1. Select the function you want from the Functions pane of the Output Node Mapping Builder.

  2. Drag the function and drop it on the appropriate parameter of the working function on the workspace area of the Output Node Mapping Builder.

    An alternative way to perform this task is to use Set Selected Function option from the context menu which appears when you right-click the parameter in the workspace area.

    You must set the parameters for the nested function as well.

    Note: You can nest functions multiple times.



x
Procedure: How to Set a Constant Value for a Function

To set a constant value:

  1. Right-click the appropriate parameter box in the workspace area of the Output Node Mapping Builder and select Set Constant from the context menu.

    You can also double-click the parameter box to set a constant.

    The following image shows the Constant option selected and a field where you can enter a value.

  2. Type the value for your constant and click OK.


x
Procedure: How to Set an Expression for a Function

To set an expression:

  1. Right-click the appropriate parameter box in the workspace area of the Output Node Mapping Builder and select Set Expression from the context menu.

    You can also double-click the parameter box and select the Expression radio button to set an expression.

  2. Type the value for your expression and press Enter.

    An expression concatenation is typically used for any number of input items and constant values in any order, in the following format:

    <input item>+'constant'+... 

    For example:

    'For '+tree/fruit+tree/fruit/year+': '+tree/fruit/apple/yield+ 
    ' bushels, '+tree/fruit/apple/avgweight+' grams avg.' 


x
Procedure: How to Remove a Function Parameter

To remove a value for a function parameter:

  1. Right-click the parameter in the workspace area of the Output Node Mapping Builder.

    A context menu opens as shown in the following image.

  2. Select Remove Parameter.

    The parameter is removed from the function.



x
Procedure: How to Cancel and Restore an Action

To cancel and restore an action within the Output Node Mapping Builder:

  1. To cancel your last action, right-click any component in the workspace, for example, the working function.

    A context menu opens as shown in the following image.

  2. Select Undo or use the keyboard shortcut Ctrl+Z.

    The last action is removed from the workspace.

  3. If you decide to restore an action, right-click any component in the workspace, for example, the output item.

    A context menu opens as shown in the following image.

  4. Select Redo or use the keyboard shortcut Ctrl+Y.

    The last removed action is returned to the workspace.

    Note: Multiple levels of undo and redo are supported. You can select Undo/Redo or use the corresponding keyboard shortcut (Ctrl+Z/Ctrl+Y) multiple times until you have achieved the desired result.


iWay Software