Assign Value to Field

Assigns a value to a specified field on the terminal.

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.

terminalSetField --index(Numeric) --value(String) (Boolean)=value

Dependencies

Connect to a terminal using the Connect to Terminal (terminalConnect) command.

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
Index index Required Number Position of the field in which the value should be assigned.
Value to Assign to Field value Required Text Value that will be assigned in the provided field.

Output parameters

Designer mode label Script mode name Accepted variable types Description
Success value Boolean Returns True if the value was successfully assigned, or False otherwise.

Example

Assigns the text "Hello world" to the field of Index "0" in a TN3270 terminal emulator.

defVar --name success --type Boolean
defVar --name terminalConnection --type Boolean
// Connecting to the example terminal.
terminalConnect --name terminal --hostname "example.com" --port 23 --timeout 00:01:00 terminalConnection=value
// Assigns the value "Hello World" in index field 0.
terminalSetField --index 0 --value "Hello World" success=value
logMessage --message "${success}" --type "Info"
terminalDisconnect --name terminal
//`True`