Repeat step properties
The Repeat step adds a loop to the extraction workflow; see Steps and Extracting transactional data.
The properties described below become visible in the Step properties pane when the Repeat step is selected in the Steps pane.
Description
This subsection is collapsed by default in the interface, to give more screen space to other important parts.
Name: The name of the step. This name will be displayed on top of the step's icon in the Steps pane.
Comments: The text entered here will be displayed in the tooltip that appears when hovering over the step in the Steps pane.
Repeat Definition
- Repeat type:
- While statement is true: The loop executes while the statement below is true. The statement is evaluated before the loop so the loop may not run at all.
- Until statement is true: The loop executes until the statement below is true. The statement is evaluated after the loop so the loop will always run at least once.
- Until no more elements (for Text, CSV, Database and PDF files only): The loop executes as long as there are elements left as selected below.
- For Each (for XML and JSON files only): The loop executes for all nodes (by default) or for selected nodes on the specified level. To have the loop execute only on selected nodes, you need to edit the Xpath/JsonPath in the Collection field (see below). If the path defines a rule that is true for more then one node/element, a collection of nodes/elements is returned and the For Each loop will go through all of them.
When using a For Each loop in XML or JSON, it is not necessary to skip to the repeating node/element or to have a Goto step to jump to each sibling, as this loop takes care of it automatically. - Maximum iterations on each line: Defines the maximum number of iterations occurring at the same position. This expression is evaluated once when entering the loop. The value returned by the expression must be an integer higher than 0.
Note that in the event of an infinite loop, an error will only be raised after the set maximum number of iterations.- Use JavaScript Editor: Click to display the Edit Script dialog.
- No Goto step required: With XML and JSON data, this option prevents the Repeat step from automatically moving forward to the next sibling (with XML) or element (with JSON).
With all other data types, it disables the DataMapper's infinite loop detection in case of a missing Goto step. It is meant to be used in situations that would otherwise require a dummy Goto step. - Collection (only with For Each):
- For XML: the XPath that specifies the level and (optionally) elements to select on that level. For an overview of XPath functions, see Mozilla: XPath Functions.
To select elements you can either use static values, e.g../user[@lastname="Smith"]
or JavaScript statements, for example:=./user[@lastname="{automation.jobInfo.JobInfo1}"]
.
In order to use JavaScript: Note that since the XPath is a string, the return value of the JavaScript statement will be interpreted as a string. - For JSON: the JsonPath that specifies the level and (optionally) elements to select on that level. For an overview of the JsonPath syntax, see https://github.com/json-path/jsonpath.
It is not possible to use Javascript in the JsonPath.
- For XML: the XPath that specifies the level and (optionally) elements to select on that level. For an overview of XPath functions, see Mozilla: XPath Functions.
Rule Tree
The Rule tree subsection displays the full combination of rules (defined below under Condition) as a tree, which gives an overview of how the conditions work together as well as the result for each of these conditions for the current record or iteration.
Condition
First, the Condition List displays the conditions in list form, instead of the tree form above. Three buttons are available next to the list:
- Add condition: Click to create a new condition in the list. This will always branch the current condition as an "AND" operator.
- Delete condition: Delete the currently selected condition.
- To rename a Condition, double click on its name from the Rule tree subsection .
Conditions are made by comparison of two operands using a specific Operator.
Text and PDF files
- Based On:
- Position: The data in the specified position for the comparison.
- Left: The start position for the data selection. Note that conditions are done on the current line, either the current cursor position, or the current line in a Repeat step.
- Right: The end position for the data selection.
- Top offset: The vertical offset from the current pointer location in the Data Sample (Viewer).
- Height: The height of the selection box.
- Use Selection: Click to use the value of the current data selection for the extraction.
- Trim: Select to trim empty characters at the beginning or the end of the field.
- Value: A specified static text value.
- Value: The text value to use in the comparison.
- Use selected text: Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used.
- Field: The contents of a specific field in the Extracted Record.
- Field: The Extracted Record field to use in the comparison.
- JavaScript : The result of a JavaScript Expression.
- Expression: The JavaScript line that is evaluated. Note that the last value attribution to a variable is the one used as a result of the expression.
- Use JavaScript Editor: Click to display the boundaries dialog.
- Use selected text: Inserts the text in the current data selection in the JavaScript Expression. If multiple lines or elements are selected, only the first one is used.
- Data Property: The value of a data-level property set in the Preprocessor step (see Preprocessor step).
- Record Property: One of the local variables that you can create and that are reset for each document as opposed to data variables that are global because they are initialized only once at the beginning of each job.
- Automation Property: The current value of a Document-level property set in the Preprocessor step (see Preprocessor step).
- Extractor Property: The value of an internal extractor variable:
- Counter: The value of the current counter iteration in a Repeat step.
- Vertical Position: The current vertical position on the page, either in Measure (PDF) or Line (Text and CSV).
- Operators:
- is equal to: The two specified value are identical for the condition to be True.
- contains: The first specified value contains the second one for the condition to be True.
- is less than: The first specified value is smaller, numerically, than the second value for the condition to be True.
- is greater than: The first specified value is larger, numerically, than the second value for the condition to be True.
- is empty: The first specified value is empty. With this operator, there is no second value.
- Invert condition: Inverts the result of the condition. For instance, is empty becomes is not empty.
CSV and Database files
- Based On:
- Position: The data in the specified position for the comparison.
- Column: Drop-down listing all fields in the Data Sample, of which the value will be used.
- Top offset: The vertical offset from the current pointer location in the Data Sample (Viewer).
- Use Selection: Click to use the value of the current data selection for the extraction.
- Trim: Select to trim empty characters at the beginning or the end of the field.
- Value: A specified static text value.
- Value: The text value to use in the comparison.
- Use selected text:Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used.
- Field: The contents of a specific field in the Extracted Record.
- Field: The Extracted Record field to use in the comparison.
- JavaScript : The result of a JavaScript Expression.
- Expression: The JavaScript line that is evaluated. Note that the last value attribution to a variable is the one used as a result of the expression.
- Use JavaScript Editor: Click to display the boundaries dialog.
- Use selected text: Inserts the text in the current data selection in the JavaScript Expression. If multiple lines or elements are selected, only the first one is used.
- Data Property: The value of a data-level property set in the Preprocessor step.
- Record Property: One of the local variables that you can create and that are reset for each document as opposed to data variables that are global because they are initialized only once at the beginning of each job.
- Automation Property: The current value of a Document-level property set in the Preprocessor step.
- Extractor Property: The value of an internal extractor variable:
- Counter: The value of the current counter iteration in a Repeat step.
- Vertical Position: The current vertical position on the page, either in Measure (PDF) or Line (Text and CSV).
- Position: The data in the specified position for the comparison.
- Operators:
- is equal to: The two specified value are identical for the condition to be True.
- contains: The first specified value contains the second one for the condition to be True.
- is less than: The first specified value is smaller, numerically, than the second value for the condition to be True.
- is greater than: The first specified value is larger, numerically, than the second value for the condition to be True.
- is empty: The first specified value is empty. With this operator, there is no second value.
- Invert condition: Inverts the result of the condition. For instance, is empty becomes is not empty.
XML files
- Based On:
- Position: The data in the specified position for the comparison.
- XPath: The path to the XML field.
- Use Selection: Click to use the value of the current data selection for the extraction.
- Trim: Select to trim empty characters at the beginning or the end of the field.
- Value: A specified static text value.
- Value: The text value to use in the comparison.
- Use selected text: Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used.
- Field: The contents of a specific field in the Extracted Record.
- Field: The Extracted Record field to use in the comparison.
- JavaScript : The result of a JavaScript Expression.
- Expression: The JavaScript line that is evaluated. Note that the last value attribution to a variable is the one used as a result of the expression.
- Use JavaScript Editor: Click to display the boundaries dialog.
- Use selected text: Inserts the text in the current data selection in the JavaScript Expression. If multiple lines or elements are selected, only the first one is used.
- Data Property: The value of a data-level property set in the Preprocessor step.
- Record Property: One of the local variables that you can create and that are reset for each document as opposed to data variables that are global because they are initialized only once at the beginning of each job.
- Automation Property: The current value of a Document-level property set in the Preprocessor step.
- Extractor Property: The value of an internal extractor variable:
- Counter: The value of the current counter iteration in a Repeat step.
- Vertical Position: The current vertical position on the page, either in Measure (PDF) or Line (Text and CSV).
- Operators:
- is equal to: The two specified values are identical for the condition to be True.
- contains: The first specified value contains the second one for the condition to be True.
- is less than: The first specified value is smaller, numerically, than the second value for the condition to be True.
- is greater than: The first specified value is larger, numerically, than the second value for the condition to be True.
- is empty: The first specified value is empty. With this operator, there is no second value.
- Invert condition: Inverts the result of the condition. For instance, is empty becomes is not empty.
JSON files
- Based On:
- Position: The data in the specified position for the comparison.
- JsonPath: The path to the JSON element.
- Use Selection: Click to use the value of the current data selection for the extraction.
- Trim: Select to trim empty characters at the beginning or the end of the field.
- Value: A specified static text value.
- Value: The text value to use in the comparison.
- Use selected text: Uses the text in the current data selection as the Value. If multiple lines or elements are selected, only the first one is used.
- Field: The contents of a specific field in the Extracted Record.
- Field: The Extracted Record field to use in the comparison.
- JavaScript : The result of a JavaScript Expression.
- Expression: The JavaScript line that is evaluated. Note that the last value attribution to a variable is the one used as a result of the expression.
- Use JavaScript Editor: Click to display the boundaries dialog.
- Use selected text: Inserts the text in the current data selection in the JavaScript Expression. If multiple lines or elements are selected, only the first one is used.
- Data Property: The value of a data-level property set in the Preprocessor step.
- Record Property: One of the local variables that you can create and that are reset for each document as opposed to data variables that are global because they are initialized only once at the beginning of each job.
- Automation Property: The current value of a Document-level property set in the Preprocessor step.
- Extractor Property: The value of an internal extractor variable:
- Counter: The value of the current counter iteration in a Repeat step.
- Vertical Position: The current vertical position on the page, either in Measure (PDF) or Line (Text and CSV).
- Position: The data in the specified position for the comparison.
- Operators:
- is equal to: The two specified values are identical for the condition to be True.
- contains: The first specified value contains the second one for the condition to be True.
- is less than: The first specified value is smaller, numerically, than the second value for the condition to be True.
- is greater than: The first specified value is larger, numerically, than the second value for the condition to be True.
- is empty: The first specified value is empty. With this operator, there is no second value.
- Invert condition: Inverts the result of the condition. For instance, is empty becomes is not empty.
- Position: The data in the specified position for the comparison.