UiPath Activities Guide

Filter Data Table

UiPath.Core.Activities.FilterDataTable

This activity is available starting with v2018.2.

Enables you to filter a DataTable variable by specifying conditions in the Filter Wizard window. The activity can keep or delete rows or columns according to the logical conditions that are specified in the wizard. The body of the activity contains a Filter Wizard button so that you can access the wizard and customize your settings at any time.

Properties

Common

  • DisplayName - The display name of the activity.

Input

  • DataTable - The DataTable variable that you want to filter. This field supports only DataTable variables.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Options

  • FilterRowsMode - Specifies whether to filter the table by keeping or removing the target rows.
  • SelectColumnsMode - Specifies whether to filter the table by keeping or removing the target columns.

Output

  • DataTable - The resulting filtered DataTable variable. Using the same variable as the one in the Input field overwrites the initial variable, while adding a new variable leaves the initial one unaffected. This field supports only DataTable variables.

Note:

If you copy and paste a customized Filter Data Table activity inside the Designer panel, it does not retain its configuration.

Filter Wizard

This wizard helps build the filtering options for a DataTable variable. It can be opened by using the Filter Wizard button in the body of the activity in the Designer panel. You can select the DataTable you want to modify as well as the one you want to save changes in, from the following fields:

  • Input Data Table - The DataTable variable you want to filter. This field supports only DataTable variables.
  • Output Data Table - The output DataTable variable. If the same variable that is present in the Input field is used, it is overwritten with the changes. Supplying a different variable does not modify the Input variable.

You can also select whether to filter by Row or by Column depending on the tab you select. There are two tabs, as follows:

Filter Rows Tab Field Descriptions

The Filter Rows tab enables you to filter a DataTable by Rows. To do so, you have the following options:

  1. Rows Filtering Mode - Specifies whether to filter the rows by keeping or removing them. This can be done by selecting the Keep or the Remove radio buttons. Selecting Keep only keeps the rows that meet the specified condition, while selecting Remove removes the rows that meet the specified condition.
  2. And/Or - Specifies the logical conjunctions to be used between conditions. This button is displayed only if you have more than one condition. By default, when you add a new condition, the button is displayed as And. Click the button to change its value to Or.
  3. Column - The name or index of the column that is to meet the condition.

Note:

When supplying a variable in the Column text box, you can use an Int32 variable to specify the column index, or a String variable to specify the column name.

  1. Operation - The logical condition that is to be met between the Column and the Value.
  2. Value - The value that is to be checked with the Operation and the Column.
  3. Add/Remove Condition - Clicking the + button adds another sentence to the condition, while clicking the x button removes a sentence.

Output Columns Tab Field Descriptions

The Output Columns tab enables you to filter a DataTable by Columns. To do so, you have the following options:

  1. Columns Selection Mode - Specifies whether to filter the columns by keeping or removing them. This can be done by selecting the Keep or the Remove radio buttons. Selecting Keep only keeps the columns that are specified below, while selecting Remove deletes the rows that are specified below from the input DataTable.
  2. Column - The columns you want to keep or remove from the datatable.

Note:

When supplying a variable in the Column text box, you can use an Int32 variable to specify the column index, or a String variable to specify the column name.

  1. Add/Remove columns - Clicking the + button adds another column, while pressing the x button removes the column.

Note:

The order you add columns in the Wizard is the order that the columns are arranged in the output table.


Filter Data Table


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.