The subsections below give an overview of basic function-related actions. The functions you see in the Libraries window depend on the transformation language you have selected. For more information, see Transformation Languages.
MapForce includes a large number of built-in functions that you can add to a mapping. For more information about all available built-in functions, see Function Library Reference. To add a function to a mapping, you can choose one of the following methods:
•Press and hold the required function in the Libraries window and drag it to the mapping area. To filter functions by name, start typing the function name in the text box at the bottom of the window.
•Double-click anywhere in the empty area of the mapping and start typing the function name (see screenshot below). To see a tooltip with more details about a function, click this function in the list. To add a function to your mapping, double-click the relevant function in the combo box.
Add a UDF
You can also add user-defined functions (UDFs) to your mapping using the same approaches as described above if (i) a UDF has already been created in the same mapping or (ii) you have imported a mapping that contains a UDF as a local or global library.
Add a constant
Constants enable you to supply custom text and numbers to a mapping. To add a constant to your mapping, you can choose one of the following options:
•Right-click anywhere in the empty mapping area and select Insert Constant from the context menu. Enter the value and select one of the data types: String, Number, or All other.
•Select the Insert | Constant menu command. Enter the value and select one of the data types: String, Number, or All other.
•Click the Constant toolbar command. Enter the value and select one of the data types: String, Number, or All other.
•Double-click anywhere in the empty mapping area. Type the double quotation mark followed by the constant value. The closing double quotation mark is optional. To add a numeric constant, just type the number.
Search for a function
To search for a function in the Libraries window, start typing the function name in the text field at the bottom of the window. By default, MapForce searches by function name and description text. If you want to exclude the function description from the search, click the down-arrow and disable the Search in function descriptions option. To cancel the search, press the Esc key or click .
To find all occurrences of a function within the currently active mapping, right-click the function name in the Libraries window and select Find All Calls from the context menu. The search results are displayed in the Messages window.
View a function's type and description
To view the data type of a function's input/output argument, move your mouse over the argument part of a function (see screenshot below). Make sure that the (Show tips) toolbar button is enabled.
To view the description of a function, move the mouse over the function's header (see screenshot below). Make sure that the (Show tips) toolbar button is enabled.
Add/delete function arguments
For some MapForce built-in functions, it is possible to add as many parameters as you need for your mapping purposes. One such example is the concat function. To add or delete function arguments (for functions that support that), click Add parameter ( ) or Delete parameter ( ) next to the parameter you want to add or delete, respectively (see below). Moving a connection to the symbol adds another parameter and connects this parameter.