Please enable JavaScript to view this site.

InterFormNG2 Manual

Map spooled file data from current page

This section covers the normal way of mapping spooled file data. This section explains e.g. what to do, if you want InterFormNG2 to iterate across all pages in the input spooled file and generate the same number of output pages.

 

You can map the spooled file contents, after you have loaded a sample spooled file in the designer.

 

If you want to only map pages within the pagerange of the input spooled file, then you should check out the section, Use the page range of an input spooled file.

 

It is explained below, but you can also see an example in this video:

 

 

 

Before you start mapping data, it is highly recommended to change the template, so that one output page will be added for each input page. To do that you should do as below:

 

1.Insert a Repeat element in the top of the template

 

NG2MapSplfs0007

2.On the Repeat element select For each page in the spooled file on the bottom left:

 

NG2MapSplfs0008

- and click Apply.

 

3.Now rearrange (drag) the Repeat and/or page element, so that the page element is placed inside the repeat like below:

 

NG2MapSplfs0009

With the change above the output from InterFormNG2 will be exactly as many pages as there are in the input spooled file.

 

4.The final step is to map data from the current spooled file page. You do that with the text element inside the page, and here you need to click Expression in the top:

 

NG2MapSplfs0003

 

Now you click the magnifying glass on the right to see the contents of the loaded sample spooled file:

 

NG2MapSplfs0010

 

You map spooled file data, by dragging a blue frame over the positions and lines, that you want to map. Keep the default value of Auto as the Page selection on the top left.

 

5. When you click OK the page mapping is inserted. The resulting function depends on the spooled file format used.

 

If the spooled file format is version 1.0 (legacy), then the function looks like this:

ng:spoolMap(./text(), 2, 27, 6, 11)

 

NG2MapSplfs0011

 

(This maps position 2 to 27 from line 6 to 11)

 

The built-in function is described here.

 

If the spooled file format is version 2.0, then the function looks like this:

ng:spoolMap(., 8, 34, 6, 12)

 

NG2MapSplfs0015

 

(This maps the positions 8 to 34 from line 6 to line 12)