Insert Label

Inserts a label that is used by the Go to and Go to If commands to reroute the script's execution.

Command availability: IBM RPA SaaS and IBM RPA on premises

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.

label --name(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 Name name Required Text Label name to insert into the script, starting with a letter.

Example

This example shows how to define a label and how to reroute the execution with the Go to (goto) command.

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

Limitations

You can't use labels inside repetition structures.