Skip to content

Get Row Data Action: getRowData

The getRowData action retrieves all the data from a specific row in a CSV file. The extracted row data is stored in the variable defined in the Element Key field, allowing you to use it in subsequent steps.

Note: Ensure that the file being used is not open during the execution of the Case to avoid errors or conflicts.

Example: Suppose you have a CSV file, EmployeeRecords.csv, located at C:\Data, with the following data:

scrn-get-row-data-command-employee-records-csv
EmployeeRecords.csv

You want to retrieve the data from the second row (row index 1, as indexing starts at 0) and store it in a variable named RowData.

Steps to Configure:

  1. Select Set a Variable Value from the Action dropdown.
  2. Enter a variable name in the Element Key field (e.g., RowData). This variable will store the retrieved row data.
  3. Click on Form, select Functions, and choose CSVHANDLE.
  4. In the Cmd field, select getRowData and provide the following parameters:
    • FPath: Specify the path to the source CSV file (e.g., C:\Data\EmployeeRecords.csv).
    • rowNumber: Enter the row index to retrieve (e.g., 1 for the second row).
  5. Click Save.
scrn-get-row-data-tabular-view
Tabular View
scrn-get-row-data-card-view
Card View

Outcome on Execution:

  • The action retrieves all the data from the specified row (e.g., row 1: 101 John Doe HR).
  • The retrieved data is stored in the variable defined in the Element Key field (e.g., RowData).
  • If the operation is successful, the variable contains the row data as a string (e.g., 101 John Doe HR).
  • This variable can be referenced in subsequent automation steps using the syntax ${VariableName} (e.g., ${RowData}).
  • If the operation fails (e.g., invalid file path or row index), the variable stores false.

Back To Top