Go to

Advances or returns to the script point where the marker is inserted.

Command availability: IBM RPA SaaS and IBM RPA on premises

Dependencies

Use the Insert Label command to create a label.

Script syntax

IBM RPA's proprietary script language has a syntax similar to other programming languages. The script syntax defines the command's syntax in the script file. You can work with this syntax in IBM RPA Studio's Script mode.

goto --label(String)

Input parameters

The following table displays the list of input parameters available in this command. In the table, you can see the parameter name when working in IBM RPA Studio's Script mode and its Designer mode equivalent label.

Designer mode label Script mode name Required Accepted variable types Description
Label label Required Text Marker used to direct the point to which the script should advance or return.

Example

While the variable used as a counter is less than 10, the Go to command returns to the point where the label was defined.

defVar --name counter --type Numeric --value 0
label --name IBM
incrementVar --number ${counter}
logMessage --message Executed --type "Info"
if --left "${counter}" --operator "Less_Than" --right 10
    goto --label IBM
endIf
//
// Result: Executed
// Executed
// Executed
// Executed
// Executed
// Executed
// Executed
// Executed
// Executed
// Executed