- Print
- PDF
Specify the Data That Each Form Is Used For (Form Criteria)
To control which form is used to process incoming data, you can add form criteria to each form.
The way that you create form criteria for a form depends on the form’s input data type. For more information about criteria (including subjects such as form expressions), see Use Criteria.
Refer to the information that corresponds to the form’s input data type:
XML input
You can define form criteria to enable Lasernet to recognize XML input files. This is done by selecting the Criterion tool and marking a node (tag) value.
It is also possible for Lasernet to recognize a tag name not containing any value. This is done by leaving the Match field empty and choosing Exist as the operator.
The Form Criterion window has the following properties.
XPath
The name of the XML node, including the top node.
Match
The value (criterion) of the XML node.
Operator
You choose the operator type that you want to use. In the example, the value of the chosen XML node must be equal to “Formpipe Software”.
The following operators are available in the drop-down box.
Operator | Description |
---|---|
exists and not exists | You can choose to let Lasernet test whether a tagname exists within the XML input file or not by using the operators “exists” and “not exists” and leaving the match string empty. Choosing any of the other available operators will force Lasernet to assume that the tagname exists and that the text data in the tag must match the match string according to the chosen operator. |
contains | Returns true if the text data contains the match string. |
not contains | Returns true if the text data does not contain the match string. |
like | Returns true if the text data matches the regular expression. |
not like | Returns true if the text data does not match the regular expression. |
= | Returns true if the text data matches the match string exactly. |
<> | Returns true if the text data does not match the match string exactly. |
Operators < <= > >= | These operators try to convert the value of the text data and the match string to numbers before comparing them. Therefore it is possible to make numerical comparisons. If either one of the text strings do not convert to a number, a regular string comparison is conducted. |
Example
If you want to test if a tag name exists, use the operator “exists” and leave the match string empty.
If you want to test if the text data contains only numbers you need to use the operator like and set the value field to \d+ . This means that regular expressions are used.
On the Form menu, click Criteria to get an overview of the defined criteria.
From the Criteria dialog, you can manually add additional criteria and/or JobInfos. You can also create expressions in exactly the same way as for non-XML forms.
Allow further form matching if no sheets are matched: If this option is enabled, when criteria are not matched for all sheets, the next recognized form from the form engine list will be processed, if any.
Text input
To define a new criterion, use the Criterion tool. If you click on the arrow to the right of the Criterion tool, a pop-up menu is displayed.
In the pop-up menu, you can choose which type of criterion you wish to define. After you have selected Form Criterion, the mouse cursor changes, and you can now mark a criterion area in the grab file on the left-hand side of the Lasernet Form Editor.
Criteria are defined in the left-hand window of the Lasernet Form Editor by using the Criteria tool and marking an area with the mouse.