Condition step
A Condition step is used when the data extraction must be based on specific criteria. The Condition step splits the extraction workflow into two separate branches, one that is executed when the condition is true, the other when it is false.
Extract steps can be added to both the 'true' and the 'false' branch (see Extracting data and Extracting transactional data).
In the Data Viewer pane, icons on the left indicate the result of the evaluation in the Condition step for each line: when true and when false.
Adding a Condition step
To add a Condition step:
-
On the Steps pane, select the step after which to insert the Condition step; then, in the Data Viewer, select some data, right-click that data and choose Add Conditional.
In the Step properties pane, you will see that the newly added Condition step checks if the selected position (the left operand) contains the selected value (the right operand). Both operands and the operator can be adjusted.
Note that the left operand is by default trimmed, meaning that spaces are cut off.
Selecting data - especially something as small as a dot - can be difficult in a PDF file. To make sure that a Condition step checks for certain data: Set the Right operand to Value (in the Step properties pane). Make a selection in the Data Viewer and click the Use selected text button in the Right Operand section. You will now be able to see whether or not the proper text is extracted by the current selection. Repeat this until you are satisfied that the proper data is being extracted. Click on the Use selection button in the Left Operand section to fill out the coordinates. The point of origin of each character is at the bottom left of each of them and extends up and to the right. -
Alternatively, right-click the Steps pane and select Add a Step > Add Conditional. Enter the settings for the condition on the Step properties pane.
Configuring a Condition step
The condition in a Condition step is expressed in a rule or combination of rules. Rules have a left operand, an operand type (for example: contains, is empty) and a right operand.
For an overview of all options on the Step properties pane, see Condition step properties.
Inverting a rule
Inverting a rule adds not to the operand type. For instance, is empty becomes is not empty. To invert a rule, check the Invert condition option next to Operator under Condition on the Step properties pane.
Combining rules
One rule is already present in a newly added Condition step. To add another rule, click the Add condition button under Condition, next to Condition List, on the Step properties pane.
Rules are by default combined with AND. To change the way rules are combined, right-click "AND" in the Rule Tree, on the Step properties pane, and select OR or XOR instead. (XOR means one or the other, but not both.)
Renaming a rule
To rename a rule, double-click its name in the Rule Tree and type a new name.