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, 'trim')
(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 and trims each line).
The parameters of the function, ng:spoolMap are in this sequence:
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.
One way to refer to spooled file contents is e.g. in an existing text element. Here you first click Expression and then the magnifying glass to view the spooled file contents. Then you see the spooled contents as below:
If this is the first time you enter this for the current parameter, then you see the trim option in the top. This is default enabled. That means, that if you now select an area with the mouse and then click OK and Apply, then the text from the spooled file is mapped, but each spooled file line is trimmed of any leading and trailing blank - if the trim option is enabled.
Another way to map spooled file data into the output (after the spooled file has been loaded in the designer) is to click this icon on the top left:
Then you can with the mouse drag around an area (which will be marked with a box) and then drag that area to the result view while holding down the left <CTRL> key on the keyboard.
For this mapping the trim option is default enabled:
As of January 13, 2025, we are excited to announce that our new Help Center is in the final stages of development. While the Knowledge Base is already accessible, our current JIRA system will continue to manage support tickets during this transition period. For assistance with InterForm Output Management Software, please refer to the Support for InterForm Output Management Software.
We appreciate your patience and understanding as we work to enhance your support experience. If you have any questions or encounter any issues, please do not hesitate to reach out via the existing support channels.
Best regards,
The InterForm Support Team