Mapping - Filling a record of the target tree

The order in which the nodes are created and the fields are created and filled with data can later be made more complicated at will. But to keep things simple, we refer only to the default settings in this introduction. Basically, you only need to know what was shown in the sections before. The splitting of data into records and the use of paths. If the skeleton of the target tree has been created this way, it is traversed from top to bottom and filled with values. So record by record, the target (sub)trees are filled with data from top to bottom. Keep in mind that only data within the current record can be accessed. Data from other records cannot be accessed (however, one can use variables to save data from a previous record into later records).

Note: For advanced profile developers, it should be mentioned that there are concepts to circumvent/break this strict execution order. See sections Using Future Values and Mount Profile as Subnode.


Creating the (partial) target tree


Based on the target structure you have created, the target tree is created and filled with data in the following way.

Mapping source tree field values to target structure fields


This is what we call the actual mapping, which simply says that the value of a source structure field "X" is assigned to a target structure field "Y." So the value the parser puts in "X" ends up in "Y". This 'statement' is executed each time the target structure field "Y" is generated in a (sub)tree.

To map two fields, simply drag the field of the source structure onto the desired field of the target structure (see the following screenshot). You can also drag the field of the target structure onto the field of the source structure.

Note: An overview of all mapped fields can also be found on page Search and find. You can also find and delete mappings via the context menu of a source or target structure field.

Note: For testing purposes, it is often convenient and useful to simply generate a 1:1 mapping.


images/download/attachments/137305121/776-version-1-modificationdate-1686205575613-api-v2.png


Only one field of the source structure can be mapped to a field of the target structure. However, a field of the source structure can be mapped to any number of target structure fields. The reason is simply that it is undefined what value a target structure field would have if, for example, the value "4" and at the same time the value "34 Queen St" would be mapped to it. Note: With functions, however, such a combination of values can be achieved.

Functions and fixed values on target structure fields


See section Functions.

Other profile as subnode


See section Mount Profile as Subnode.

Pruning the (partial) target tree


The basic structure of the target tree to be generated can be further reduced by simply not creating some nodes (we also say those nodes are not entered). This also applies to certain fields.

Functions on nodes


You can, for example, place a function on a node. If the function has the result "true", then the node (and all nodes and fields below the node) is created/entered, otherwise not. In a mapping test, nodes that have not been entered are not displayed. The same applies if you set a node inactive (attribute "Inactive").

Removing entered node again


It is possible to use function remove last entered node() to remove a node that has already been entered. See details there.

SQL nodes


There are also special nodes that are not displayed in the output data. These nodes are for the interaction with databases only (attribute "Only for SQL").

In a mapping test, however, such nodes are displayed.

Calculation fields


There are special fields (attribute "Calculation field") that only serve to calculate or manipulate values and are also not displayed in the output data.

In a mapping test, however, such fields are displayed.

Iteration nodes


There are special nodes (attribute "Iteration node") that mainly serve to calculate or manipulate values and are only partially displayed in the output data.

Iteration nodes have a special feature. As you know, each node can be repeated any number of times using the "Path" attribute. If an iteration node repeats 10 times, for example, you will only see one occurrence of the node at the end. That is, the node has been entered 10 times and thus all fields of the node have been entered 10 times and possibly existing functions were executed 10 times as well. All the attributes and setting options that you know from normal nodes apply, but the difference is that only the last iteration of the node is held in memory. This has the obvious advantage that you can potentially save a huge amount of memory.

In a mapping test and in the output data, only the last iteration of the node is displayed.

Advanced settings


On the following pages, you will find advanced settings for influencing the generation of the target tree. Normally, this will not be necessary, but sometimes there are special cases in which this can be useful.