Mappings always refer to the contents of the spooled file and when you want to create a new mapping, then you start out by selecting the upper left corner of the area, that you want to map.
So it is a bit of a challenge, if you want to create two conditioned mappings, that selects the exact same spooled file area.
If we e.g. consider the address of this demo spooled file:
Then we might want to create two different nodes in the output XML tree depending on the contents of the first word.
For the example above we e.g. want to create an address node named Herring, if the first word is Herring:
For this we have created a fitting token:
Now we also want to test for another word in the same area, and we want to create an XML node, Florence, if this is the first word.
The problem is however to select the same area twice, because if you try to create a second mapping with the same starting position, then the editor thinks, that you want to edit the existing mapping.
So instead you need to start the creation of the second mapping in a new area, that is more to the left/right or above/below the starting point, that you really wanted to map. If you select a start position, that is to the left or above the existing mapping, then the new mapping will be added above the previous one in the output XML data list:
If the new mapping is selecting data only within the existing mapping, then the editor will create mapping, that is a child of the mapping, that surrounds it:
If you create the new mapping with a starting point, that is to the right or below the starting point of the existing mapping (and is not surrounded by the existing one), then the new mapping will be created below the existing one in the XML data:
Now you can edit the new mapping and place it where you want in two ways:
1.You can drag in the frames in the spooled file view:
2.You can change the line/columns in the properties of the new mapping:
Now we can now add a condition for this second mapping, which is true on the second and third page of the spooled file:
With the new overlapped mapping in place InterFormNG2 will always insert new mappings in the mapping, that is listed last in the data list. This means e.g. that if we want to select the name of the company, then this will as default be inserted into the last address window as below:
If you want to insert the Company node in the Herring node above, then you first need to temporarily move (or reduce) the area of the second node (Florence), so that the two main nodes are not overlapping in the area of the company name and then you can insert the Company node for the Herring node as well:
(Above I have temporarily moved the area for the Florence node a new lines down).
After the addition of the Company node in the Herring node, I move the area for the Florence node back up to where it should be.
With the settings above we have built this output XML file: