Splf extractor: Tokens

Splf extractor: Tokens

In the spooled file extractor you can build conditions to conditionally select section of the spooled file. Whenever you add a condition you compare the selected text with a token.

Predefined tokens

InterFormNG2 is delivered with these predefined tokens:

Token
Description
Digit
One of the digits: 0..9
Letter
A character, that is not a number and not a space/blank/whitespace/NewLine
EmptyLine
True if the complete line (inside the selected spooled file area) is blank/empty.
NewLine
The new line (line feed). This is true for the last +1 character on each line of the selected area.
WhiteSpace
Blank/space
Token
Characters not listed above in the other tokens e.g. ,;:.-_§½!"#¤%&/()=?`|@£$€{[]}+´

This sections contains this:

How to create a token

Edit a token

Delete a token

How to create a token

If you want to add a condition, that is to compare with a very specific text, that is not included in the list of predefined tokens above, then you can create your own tokens.

In the spooled file extractor editor you first need to click the tokens tab in the top left:



 

Now you see a list of the tokens defined in the transform definition, that you are currently editing and in the bottom left you can click the icon add token to add a new one:



 

Then you can move on and edit the token as described below. The new token is added on the top in red.


How to edit a token

If you select the token tab on the upper left, then you will see the list of user defined token like below:

NG2SFE0030

 

The token is defined via next fields:

  1. Name
    The name of the token. This is what you need to reference in conditions later.
  1. Type
    This sets the type of description, that you want to use to define the comparison text. You have two options:

Pattern

Here you define a pattern to compare with. You have these options:

Text constant: A text constant must be delimited with double quotes e.g. "abc".

C: Use a C to indicate any kind of character.

D: A digit

H: A hexadecimal number (i.e. 0123456789ABCDEF)

_: Whitespace/blank character

 

Each of the options above can be combined.

If you e.g. use the pattern: "abc"CCC_DDD, then this will e.g. match the text abcdef 007.

RegExp

Here you can state a regular expression. If you simply want to compare with a text constant, then you simply write the text without any delimiter.

More information about regular expressions can e.g. be found here: https://regexone.com/. You can e.g. test your regular expressions here. https://regex101.com/

 

Here are a few examples:

NG2SFE0031

Delete a token

If you want to delete a token, then you simply need to click the trash can icon to the right of the token:

NG2SFE0032


 


    • Related Articles

    • Splf extractor: Conditioned mappings

      Both the line and block element can be conditioned in the spooled file extractor. To condition an element you should first select the area in the spooled file view and create a simple mapping. Now you need to enable triggers on the right in order to ...
    • Introduction to the Spooled file extractor

      IMPORTANT: The spooled file extractor is no longer supported. Any spooled file extractor definitions, that has previously been designed can still be used in the workflow, but they cannot be edited. The better alternative is to use the designer for ...
    • Splf extractor: Simple mapping

      The spooled file extractor selects data from all the pages of the spooled file. The output XML file is a file with a node for each spooled file page, so it is very each to see from which spooled file page the XML data was extracted. First you need of ...
    • Splf extractor: Expanable parent

      In the spooled file extractor it is possible to build a tree structure in the output XML. One challenge can however be, that you want a header mapping have a variable length to include a variable number of extra detail lines, that should be ...
    • Splf extractor: How to save

      When you created a new spooled file extractor or edited an existing one via the editor, then the save icon in the top becomes blue, which indicates, that the definition has been changed. To save the current spooled file extractor you simply click on ...