Please enable JavaScript to view this site.

InterFormNG2 Manual

This section lists and describes the functions available to extract information from the spooled file. Normally you do not need to think much about this as the functions are normally added when you select an area in the input spooled file, so you do not need to remember all the details, but this can be used for reference if you want to verify/understand the elements of an existing template.

 

The spooled file extract functions are:

 

1.ng:spoolMap.

This maps a window of text from the spooled file - either from the current page or from a specific page.

 

2.substring.

This function can e.g. be used for extracting a substring of the current spooled file line - within a repeat of spooled file lines. The line repeat is normally inserted within a page repeat.

In general it extracts a section of the input string. For the substring you will normally see it used as this: substring(.,57,4). The first parameter is a dot, which refers to the current node of the input file. In the example substring(.,57,4) the spooled file data in position 57 to 60 of the current spooled file line is extracted. The linked video below shows how this may be used.

 

3.ng:spoolMapRel (only for version 2 spooled files).

This can only be used within a repeat over spooled file lines. Within that repeat the ng:spoolMapRel refers to relative spooled file lines i.e. relative line 0 is the current line, relative line -1 is the spooled file above the current line and relative line +1 is the line below the current spooled file line. If the ng:spoolMapRel function only refers to the current spooled file line, then it is the same as substring().

These functions does the same: substring(. , 57, 4) and ng:spoolMapRel(. , 57, 4, 0, 1).

 

Here is a video that shows how to use the ng:spoolMapRel function:

 

 

 

 

4.ng:spoolMapCond (only for version 1 spooled files).

This function extracts a window of text while testing the contents of each spooled file line. For Version 2 spooled files you should instead use a line repeat.