Count Terminal Fields

Counts the editable fields in a 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.

terminalcountfields (Numeric)=value


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

Output parameters

Designer mode label Script mode name Accepted variable types Description
Count value Number Number of editable fields in the terminal.


This command is used to count the number of editable fields in a TN3270 terminal emulator.

defVar --name terminalConnect --type Boolean
defVar --name terminalFields --type Numeric
terminalConnect --name terminal --hostname "" --port 23 --timeout 00:00:01 terminalConnect=value
terminalcountfields terminalFields=value
terminalDisconnect --name terminal
logMessage --message "Terminal Fields: ${terminalFields}" --type "Info"
// Result: terminalFields: 1