The built-in function, ng:spoolMap is only available in InterFormNG2, if you are running InterFormNG2 on the IBM i platform.
With this function you can map data from an input spooled file in the designer, and extract information from the spooled file e.g. to use a conditions in both the designer and the workflow.
An alternative to the ng:spoolMap is the ng:spoolMapCond function, that only maps spooled file lines, that fit a specific condition. You can also consider to use the ng:spoolMapRel for referring to spooled file lines x-lines below a valid condition.
The easiest way to use the ng:spoolMap function is to first load a spooled file, and then insert the function via the magnifying glass e.g. in the text element.
Here is an example of the function:
ng:spoolMap(//page[1], 1, 132, 1, 80)
(This selects the spooled file data from page 1 of the input spooled file. It takes the information from position 1 to 132 of the lines from 1 to 80).
The parameters of the function, ng:spoolMap are in this sequence:
1.A reference to the page, that you want to map.
2.The start position number to map.
3.The end position number to map.
4.The start line to map.
5.The end line to map.
The first parameter is a bit special. For that you have two options:
1.You can refer to a specific page number. You should e.g. do that, if you e.g. to insert a condition to compare spooled file data in a specific page, positions and line. For that you select the page number like above: //page[<nbr>], where <nbr> is the page number, that you want to select.
2.You can also refer to the current page. This usage is normally only used in the designer, where you repeat the page element for all pages in the input spooled file as shown in these sections: Map spooled file data from current page and Reproduce input spooled file as output. In these examples you should map the spooled file data with Auto set as the page number in the upper right corner. If you want to type in a reference to the current number, then the page reference in the ng:spoolMap function should be ./text(), so the function: ng:spoolMap(./text(), 2, 27, 6, 11) maps position 2 to 27 of lines 6 to 11 of the current page.
Special information concerning mapping of blank lines (including lines with just blanks): If this function is mapping only one single blank line, then this will not force a vertical reposition in a dynamic flow. This and the workaround/solution is covered in the section, Vertical flow for a blank text of the text element.