Functions

Function list and function chain field


images/download/attachments/164333141/1104-version-2-modificationdate-1742536770178-api-v2.png


(1) Here you can either search in all existing functions and macros or restrict the search to certain function groups or just the macros. You can search for functions using search terms in the filter field below. By default, the function descriptions (tooltips) is also considered in the search. If you only want to search in the function names themselves, please use a leading colon.

(2) To insert a function on a selected node or field of the target structure, locate the desired function in the list and double-click it or drag it directly into field (2). Using the context menu, you can display the documentation for a function and an "overview of all functions". You can also find this overview list on page "Help".

images/download/attachments/164333141/1295-version-2-modificationdate-1742536782367-api-v2.png

(3) The list of all used functions, the so-called "function chain".

(4) The position number of the function in the function chain. If you move the mouse directly onto the position number, you will get a tooltip with a brief description of the function. A complete documentation of the function is available via the context menu. You can also delete, copy and paste the function there.

Parameter fields


images/download/attachments/164333141/1095-version-3-modificationdate-1742536794969-api-v2.png


(5) If you move the mouse directly onto a parameter letter, you will get a tooltip with a brief description of the parameter. A complete documentation of the function is available via the context menu.

(6) Here you can select the parameter type ("Value", "Variable", "Result", "Link", "Source field", "Target field"). You will find a description in the section "How functions work" below.

(7) The value for the respective parameter. Depending on the parameter type (5), you can also select names of variables (via the then visible selection menu), constants (via the context menu), fields (via item 8) and configuration files (via the context menu).

(8) Here you can open a larger input field, select a configuration file (from folder ./conf), a profile constant (%CONST_NAME%) or, depending on the parameter field, also select from a list of allowed values (e.g. usable encodings or MIME types, available database aliases, certificates, channels, etc.). A useful feature that you should keep in mind.

Lower bar


images/download/attachments/164333141/1105-version-2-modificationdate-1742536807169-api-v2.png


(9) The main purpose of the menu is to manage macros. You can create a macro out of the existing function chain or edit or insert an existing macro.

(10) Here you can move a function to another position (4) within the function chain.

(11) Here you can display the complete function chain and add notes to it.


images/download/attachments/164333141/1106-version-2-modificationdate-1742536819337-api-v2.png

How functions work


Functions can be used on nodes and fields of the target structure. They have input parameters and a return value and are be able to perform certain operations. However, no programming skills are necessary.

It is also possible to subsequently execute several functions on the same target field (or node). We call that a function chain.

A function can have 0 to n input parameters. The following types are available.


  • "Value". Simply numbers and/or letters. You can also use constants in the syntax %CONST_NAME%.

  • "Variable". The name of a variable. The parameter value will then be the value of the variable.

  • "Result". The position of a function in a function chain that is called before this function. The parameter value will be the return value of the function with the specified position number.

  • "Link". The value of the source field mapped to this target field.

  • "Source field". The name of a field of the source structure. The parameter value will be the value of the source structure field.

  • "Target field". The name of a field of the target structure. The parameter value will be the value of the target structure field.


Note: If a target structure field uses another target structure field as the input parameter for one of its functions, pay attention to the order of the target structure fields. The target structure field that uses the other target structure field as a parameter value, must be below this other field in the target structure. Otherwise, the target structure field that is used as the input parameter, would have no value, since the fields of the target structure are processed from top to bottom.

Note: There is also a way to work around the processing order. See section Using Future Values.

Order of value assignments to target structure fields (and target structure nodes)


  1. The mapped value (if there is one).

  2. The return value of a function (if there is one). For function chains, always the return value of the last function in the chain is used.

  3. Fixed value of the target structure field (if there is one).


The subsequent value assignment always overwrites the previous one. That is, if a target structure field has a fixed value, then the mapped value of this target structure field and the return value of a function on the target structure field is overwritten.

Note: In principle, this also applies to nodes in the target structure, but there are no mapped values and no fixed values, so only return values of functions.

Effect of functions on target structure nodes


The return value of a function on a target structure node can be used to control whether the node is entered during the mapping and therefore whether it is generated in the target tree or not. This is a very helpful technique to control the construction of the target tree in the mapping process.

If the return value is "true" (resp. a string that begins with a "t" or a "T" or a number > 0), the target structure node is entered and thereby the target tree node is created.

If the return value is "false" (resp. a string that does not begin with a "t" or a "T" or a number <= 0), the target structure node is not entered and thereby the target tree node will not be created.

Note: See also data type "Boolean".

Note: The return value can be a Boolean return value of a function (or a function chain) or simply the string "true" or "1", as the return value of the function copy().

Security - Defining access restrictions


It is possible to restrict the allowed directories (whitelist) functions can access in the local file system in a properties file ./etc/admin/datawizard/whiteListPaths.properties.

You must enter the absolute paths that are allowed (subfolders are included). Example:


/home/demo
/opt/IS/conf


Note: This list also applies to the time-driven Input Agent "File" and the Response "File".

Note: The access to configuration files and SMB shares is not affected by this list.

Security - Defining function restrictions


It is possible to disable certain functions in the GUI. Disabled functions will not be displayed in the function list. For this purpose, the IDs of the functions to be disabled must be specified in the configuration file ./etc/admin/datawizard/excludedFilter.properties. You can see the ID via the context menu of a function in the function list. You could, for example, disable functions that are able to access the local file system.