Skip to content

Get Column Data Action: getColumnData

The getColumnData action retrieves all the data from a specific column in a CSV file. The extracted column data is stored in the variable defined in the Element Key field, allowing you to use it for further automation steps or validations.

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 named EmployeeRecords.csv, located at C:\Data, with the following data:

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

You want to retrieve all the data in the Department column and store it in a variable named DepartmentData.

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., DepartmentData). This variable will store the extracted column data.
  3. Click on Form, select Functions, and choose CSVHANDLE.
  4. In the Action field, select getColumnData and provide the following parameters:
    • FPath: Specify the path to the source CSV file (e.g., C:\Data\EmployeeRecords.csv).
    • ColumnName: Enter the name of the column to retrieve (e.g., Department).
  5. Click Save.
scrn-get-column-data-tabular-view
Tabular View
scrn-get-column-data-card-view
Card View

Outcome on Execution:

  • The action retrieves all the data from the specified column (Department) in the CSV file.
  • The extracted data (e.g., HR IT Sales Marketing) is stored in the variable defined in the Element Key field (e.g., DepartmentData).
  • If the operation fails (e.g., invalid file path or column name), the variable stores false.
  • The variable can be referenced in subsequent steps using the syntax ${VariableName} (e.g., ${DepartmentData}).

Back To Top