moveTo()

Moves the position of the pointer in the source data file. This is a method of the steps object (see steps).

moveTo(scope, verticalPosition)

Moves the current position in a text file to verticalPosition where the meaning of verticalPosition changes according to the value specified for scope.

scope

Number that may be set to: 0 or steps.MOVELINES1 or steps.MOVEDELIMITERS2: next line with content

verticalPosition

Number. What it represents depends on the value specified for scope.

With the scope set to 0 or steps.MOVELINES, verticalPosition represents the index of the line to move to from the top of the record.

With the scope set to 1 or steps.MOVEDELIMITERS, verticalPosition represents the index of the delimiter (as defined in the Input Data settings) to move to from the top of the record.

With the scope set to 2, verticalPosition is not used. The position is moved to the next line after the current position that contains any text.

Example

The following line of code moves the current position in a text file 14 lines down from the current vertical position (steps.currentPosition) of the pointer in the data, as long as it is on the same page.

Copy
if(steps.currentPage > curPage) {    
    steps.moveTo(0, steps.currentPosition+14);    
    curPage++;
}

moveTo(scope, verticalOffset)

Moves the current position in a PDF file to verticalOffset where the meaning of verticalOffset changes according to the value specified for scope.

scope

Number that may be set to:

  • 0 orsteps.MOVEMEASURE

  • 1 orsteps.MOVEPAGE

verticalOffset

Double. What it represents depends on the value specified for scope.

With the scope set to 0 or steps.MOVEMEASURE, verticalOffset represents the number of millimeters to move the current position, relative to the top of the record (NOT the top of the current page).

With the scope set to 1 or steps.MOVEPAGES, verticalOffsetrepresents the index of the target page, relative to the top of the record.

moveTo(xPath)

Moves the current position in a XML file to the first instance of the given node, relative to the top of the record.

xPath

String that defines a node in the XML file.

Tip: TheXML elementsdrop-down (on the Settings pane, under Input Data) lists xPaths defining nodes in the current XML file.

moveTo(row)

Moves the current position in a CSV file to the given row number.

row

Number that represents the index of the row, relative to the top of the record.

moveTo(jPath)

Moves the current position in a JSON file to the first instance of the given element, relative to the top of the record if the jPath is absolute (starts with $ which is the root) or relative to the current position if the jPath is relative (starts with . which is the current element).

jPath

JsonPath expression (String) that defines the path to an element in the JSON file. See also: JsonPath.

Tip: The full JsonPath to an element is displayed at the bottom left of the window when you select it. To copy the path, right-click it and select Copy.