This activity can be used to filter a “specific value” either by restricting or excluding
the “Rows or columns” from the “Input datatable.”
Technical reference
INPUT |
ColumnFilterMode: It gets auto filled once the option is selected in the “Filter Wizard” window. Select the options from the drop-down to filter the “column.” Keep: It enables to display only the specified “Column and its values”. Remove: It enables to remove only the specified “Column value” from the table. |
|
InDatatable: Enter the "Input datatable" variable where the input data is stored. This parameter helps you to filter the “Rows/ Columns” from the table. This field only accepts the "datatable" data type. |
||
RowFilterMode: It gets auto filled once the option is selected in the “Filter Wizard” window. Select the options from the drop-down to filter the row. Keep: It enables to display only the specified “Row and its values.” Remove: It enables to remove only the specified “Row value” from the table. |
||
MISC |
DisplayName: Displays the name of the activity. It can also customize the activity name to helps in troubleshooting. |
|
FilterRowQuery: It gets auto filled once the “Row’s values” are specified in the filter wizard box. It indicates “Query” to the filter the rows from the table.
This field accepts only “String” datatype.
When left blank, it will throw an exception to provide the “RowQuery” if either the “Rows” or “Columns” are not specified. |
||
SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”. By default, it is set to “False.” True: Continues the workflow to the next step None: If the option is specified as blank, by default the activity will perform as “False” action. |
||
Version: It specifies the version of the Datatable automation feature in use |
||
OUTPUT |
OutDatatable: It helps to view the output of the activity after filtering the rows and columns in a “Datatable” datatype. (Refer the steps below to create a variable). |
* Represents mandatory fields to execute the workflow.
Utilization of Filter Wizard
1. Drag and drop the “Filter” activity from the Datatable Automation.
2. Double click on the activity and choose the “Filter wizard” option.
3. The filter wizard will have two tabs such as “Filter rows” and “Limit columns”.
a. Limit columns:
i. It enables column filtering, either restricting the view to specified
columns or excluding specified columns from the table.
ii. This tab has two options,
iii. Keep – This option displays only the specified columns.
iv. Remove – This option eliminates the specified columns.
v. Specify the “Column” name from the “Input Datatable”.
vi. Multiple columns can be filtered by choosing the “+” button to
add more columns from the table.
vii. Select either to keep or remove the columns.
viii. Once done, click on “OK” button.
b. Filter Rows:
i. It enables row filtering, either restricting the view to specified
rows or excluding the specified rows from the table.
ii. This tab has two options,
iii. Keep – This option displays only the specified rows.
iv. Remove – This option eliminates the specified rows.
v. Specify the “Column” name from the “Input Datatable”.
Operations available in Filter wizard:
vi. Choose the operation from the drop-down.
· < : It validates to check whether the provided “ColumnName” is
lesser than the specified “RowValue”.
· >: It validates to check whether the provided “ColumnName” is
greater than the specified “RowValue”.
· <= : It validates to check whether the provided “ColumnName” is
lesser than or equal to the specified “RowValue”.
· >= : It validates to check whether the provided “ColumnName” is
greater than or equal to the specified “RowValue”.
· = : It validates to check whether the provided “ColumnName” is
equal to the specified “RowValue”.
· != : It validates to check whether the provided “ColumnName” is
not equal to the specified “RowValue”.
· IsEmpty: It validates to check whether the provided “ColumnName”
is empty.
· IsNotEMPTY: It validates to check whether the provided “ColumnName”
is not empty.
· StartsWith: It validates to check whether the provided “ColumnName”
starts with the specified value.
· EndsWith: It validates to check whether the provided “ColumnName”
ends with the specified value.
· Contains: It validates to check whether the provided “ColumnName”
contains with the specified value.
· DoesNotStartwith: It validates to check whether the provided
“ColumnName” does not starts with the specified value.
· DoesNotEndWith: It validates to check whether the provided
“ColumnName” does not ends with the specified value.
· DoesNotContain: It validates to check whether the provided
“ColumnName” does not contains the specified value.
vii. Multiple columns can be filtered by choosing the “+” button to add more
columns from the table.
viii. Select either to keep or remove the columns.
ix. Once done, click on “OK” button.
Here's an example of how the FilterTable activity works –
In the following example, I am using the “Excel sheet” which is used to automate in
the Use case. To get a better understanding, click here.
1. Drag and drop the " FilterTable " activity onto the designer pane.
a. This activity can only be utilized after the other “Datatable activities.”
b. It helps to filter the “Rows and columns” either by restricting or
excluding the values from the “Datatable.”
c. Here I am extracting the output as “Datatable” from the “Excel sheet”
using the “ReadRanges” activity from the “Excel Automation.”
(Refer the Use case to get detailed information).
i. “JoinedTable” is the output for the “datatable” which has been
declared here.
d. Double clicking on the activity to launch the “Filter Wizard” option.
i. The “Table Filter Wizard” will appear on the screen, using
this wizard I am going to remove two columns from the datatable.
ii. Moving to the “Limit Columns” tab.
iii. Here I am specifying the first “Column name” as “Position”
from the input table. (Refer the attached excel sheet in the use case)
iv. Then selecting the “+” button to add another column.
v. Specifying the second “Column name” as “Start date” from the
input table. (Refer the attached excel sheet in the use case)
vi. Then choosing the “Remove” radio button.
e. To save the changes I click on the “OK” button.
f. Navigating to the “InDatatable” in properties of “FilterTable” activity
to input table to filter the “Columns” from it.
g. Here I am using the “JoinedTable” as input which is extracted from the
“Excel sheet”.
h. Moving to the “OutDatatable” to declare an out variable to view the
“Filtered columns” in the table.
i. There are two ways to create a variable-
ii. Method 1 – Click on the "OutDatatable" property within the "FilterTable"
activity and enter the variable name. In this case, I am using
" FilteredTable." Then, press "Ctrl+Q," which is a shortcut key to
create a variable.
iii. Method 2 - Click on the Variables pane and enter the name " FilteredTable."
Then, in the "Variable Types" column, select "Browse for Types" from the
dropdown menu.
iv. The .Net window for data types will appear on the screen, enter the type
name as “System.Data.Datatable” and then click on “OK” button.
2. Now, I have executed the workflow to view the filtered table.
3. You can add “table viewer” activity to view the filtered columns in a table format.
(Below is the sample of the “Filtered Table” output, the “Position” and "Start date"
column has been removed.)
Click here to know how the activity is used in the workflow.