Repeat Step

The Repeat Step is a loop that runs more than once. There are multiple types of repeat steps used for different actions.

Repeat Steps do not automatically move the pointer in the file. In order to avoid infinite loops, a Goto Step must be present within the loop itself.

By default, if an Extract Step is added within a Repeat Step, its extraction is made in a detail table.

Step Properties

Description

This section is collapsed by default in the interface in order to give more screen space to the important parts.

Name: The name of the step. This name will be shown on top of the step's icon in the Extractor Pane.

Description: The text entered here gives more details on the step and will be displayed in the tooltip appearing when hovering over the step in the Extractor Pane.

Repeat Definition

  • Repeat Type:
    • While statement is true: The loop executes while the statement below is true. The statement is evaluated after the loop so the loop will always run at least once.
    • Until statement is true: The loop executes until the statement below is true. The statement is evaluated before the loop so the loop may not run at all.
    • Until no more elements: The loop executes as long as there are elements left as selected below.
    • For Each (XML Only): The loop executes for all nodes on a specified level. Note that when using an XML For Each loop, it is not necessary to skip to the repeating node or to have a Goto step to jump to each sibling, as this loop takes care of it automatically.

Condition

This section only appears with "While statement is true" and "Until statement is true" repeat types.

The comparison is made between two separate values using a specified operator. Both values are set using the same Value Type settings.

  • Value Types

    • Position: The data in the specified position for the comparison. The position options that follow depend on the data sample type.
      • PDF:
        • 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.
        • 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.
      • Text:
        • 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.
        • 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.
      • CSV and Database:
        • Field: The field in the CSV of which the value is used for comparison.
        • Trim: Select to trim empty characters at the beginning or the end of the field.
      • XML:
        • XPath: The path to the XML field of which the value is used for comparison.
        • 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 Edit Script 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.
    • Document 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 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".

Table of Contents

Index

Glossary

-Search-

Back