Goto step

Although invisible, there is a cursor in the Data Viewer that represents the location that the extraction workflow will be processing next in the current record. In an extraction workflow the cursor starts off at the top-left corner of each record in the source data.
The Goto step can move the cursor to a certain location in the current record. The target location can be relative to the top of the record or to the current position.

When the Goto step is used within a Repeat step, it moves the cursor in each loop of the Repeat step. In this case the new location has to be relative to the current position.

The Goto step isn't used in XML extraction workflows in most cases. The DataMapper moves through the file using Xpath, a path-like syntax to identify and navigate nodes in an XML document.

The DataMapper moves through JSON files using JsonPath, a path-like syntax to identify and navigate elements in a JSON document. For an overview of the JsonPath syntax, see https://github.com/json-path/jsonpath. One example of this is given in a How-to: XML/JSON loops.

In the DataMapper the JsonPath can be absolute (start with $ which is the root) or relative to the current position (start with . which is the current element).

However, going up to a parent element is not possible with a relative JsonPath. In cases where an absolute JsonPath is necessary a Goto step might be needed.

Adding a Goto step

To add a Goto step:

  • On the Steps pane, select the step after which to insert the Goto step. In the Data Viewer, select some data, right-click that data and choose Add Goto, to add a Goto step that moves the cursor to that data.

  • Alternatively, right-click the Steps pane and select Add a Step > Add Goto. Make the required settings on the Step properties pane.

Configuring a Goto step

For information about how to configure the Goto step, see Goto step properties.