GetField

Estimated reading: 4 minutes 1811 views

This activity helps the user to extract the value from the specified rows/column’s position in the terminal system.

Properties

INPUT

Row/Column: *This parameter indicates the row and column position of the field from where the text needs to be retrieved. It accepts the input value in “String” datatype. You can either hardcode the values in “String” format variable or provide the values in “String” datatype.

The “Row/Column” position will be available in the “Terminal” screen at the bottom. Based on the cursor point, the row and column value can be retrieved.

Label Before: This parameter indicates the value prior to the specified row and column’s position. This field will be automatically detected once the row and column position has been provided. It accepts the input value in “String” datatype. You can also hardcode the values either in “String” format variable or provide the values in “String” datatype.

Label After: This parameter indicates the value following to the specified row and column’s position. This field will be automatically detected once the row and column position has been provided. It accepts the input value in “String” datatype. You can also hardcode the values either in “String” format variable or provide the values in “String” datatype.

MISC

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”
True: Continue executing the workflow regardless of any errors thrown.
False:
 Halt the workflow if it encounters any errors.
None:
 If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Version: It indicates the version of the feature being used.

OUTPUT

Result: It provides the ability to view the execution status of the activity. It returns values in “Boolean.”

True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Text: It helps to view the output of the activity as the value that has been extracted from the terminal system. It returns values in “String” datatype.

* Represents mandatory fields to execute the workflow.

Example 

In the example below, I am connecting to the terminal and retrieve the username from the system using the GetField activity.

Note: The emulator has already been configured, and the session has been launched to perform automation.

1. Drag and drop the “TerminalSession” activity into the workflow.
2. Double click on the activity and select the “Configure Session” option.
a. Click here to view how to configure the session. 
3. Now, add the “Get Field” activity into the “Do” sequence of the terminal session activity. 
4. In the “Row/Column” position, I am providing the value as “07/17” which indicates the row and column position. 
a. To get the row and column position, you can place the cursor against the text which you are extracting, and the row and column value will be displayed in the bottom of the screen. 
b. Once the Row/Column value has been provided, the activity will automatically fill the “Label Before and Label After” field. 
5. Move to the “Text” in the output section of the properties to declare a variable to view the output of the activity.   
a. There are two methods to declare a variable –
b. Method 1: Double-click on the variable parameter in the “Output” section and enter a name that helps you easily identify it in the flow. Here, I’m using the name “Result” and using the shortcut key “Ctrl+Q” to create the variable.
c. Method 2: Click on the variable pane, enter your preferred name (here, I’m using “Result”), and choose the data type as “String” since the output value accepts the string data type.
6. Now, add a “Writelog” activity to print the output of the activity. 
a. In the “InputString”, provide the value as “Result”. 
b. Choose the log level as “Info”.
7. Now, execute the activity and view the result. 

Share this Doc

GetField

Or copy link

CONTENTS