Updated April 3, 2023
Introduction to UiPath Filter Data Table
The UiPath filter data table is defined as the data table where we can use the select() method to allocate the rows to the array or data table by using the expression. For that, we need to generate the type variable, either data table or data row, which is an array of data rows. Then, we can say that using the Select() method will provide the data rows, and we can transform that at any time for a data table. Bypassing this query, we can able to select the rows and columns.
What is the UiPath filter data table?
The filter data table allows us to filter a Data table by describing some conditions in the filter wizard window; there are some activities in which we can delete or keep the row as it is by providing the logical conditions in the wizard. The activity may contain the filter wizard button where we can customize the setting at any time. It has some properties like common in which it can display the name of the activities, input this field has the variable; misc provides the security that if the value or variable has been selected, then that will no longer be available, options mean it provides some options whether we can keep or remove the targeted row, output this will provide the resultant filtered data table.
How to use UiPath filter data table?
Let us see how to use the filter data table in UiPath,
- In the UiPath window’s design view, we must select the ‘Activities’ tab and search for a data table. Then we will get the ‘Data table’ then we have to select the ‘Filter data table,’ so before we create a data table, we have to build a data table by entering information in the appropriate fields.
- When the ‘Build data table’ tab opens, we must drag and drop the ‘Filter data table’ in the build data table.
- When we click on the ‘Data Table’ button then, we will get some fields which we need to fill like, Name, Location, Company Name, etc.; after filling the information, we can filter out the information as per our needs; it allows us to edit fields. Also, it means we can create fields as per the requirement.
- If we have to filter location that how many employees from one location, then we can get it from ‘Filter Wizard.’
- The ‘Filter Wizard’ is the button available at the ‘Filter Data Table’; when we click on it, another window will open where we can put the filter.
- When we click on the ‘Filter Data Table,’ we have to provide the ‘input data table’ as an input, and when we give the fields which we require, like location, we need to perform the operations by giving value.
UiPath filter data table multiple values
If we want to retrieve multiple values from one column that we have to construct the parameters, and we also have to add them as a variable. A Select() method can get multiple values, such as ‘DataTable.Select method’,
We can do it by using a list of integers; we have some specific syntax for that; let us see the syntax for it,
var rows = new DataRow[]
var dynaIntArr = {10,20,30}
var join_dynaIntArr = String.Join(",",dynaIntArr)
rows = rulesDT.Select("[Age] IN (" + str_dynaIntArr + ")")
We can also select multiple values by using the list of strings, make use of a list of strings, or retrieve multiple data from one list. For that, we have to silence every value under the single quotation; we can say it will be a good way to develop the string.
var rows = new DataRow[]
var dynaStrArr = {"'Four'","'Five'","'Six'"}
var join_dynaStrArr = String.Join(",",dynaStrArr)
rulesDT.Select("[Emp] IN (" + join_dynaStrArr + ")").
Filter rows and columns:
- Filter rows: The ‘Filter Rows’ tab is present at the filter wizard of a data table in which it allows to filter off a data table by using rows,
- Keep or remove matching rows: This option will say whether we want to filter the rows by keeping them or removing them, which can be done by clicking on the radio button, which is given separately for keep and removes; if we click the keep radio button, we have to keep the row which it will meet the requirements, and when we will select the remove it means that it will remove the row which fulfills the given requirements.
- And: These are the logical conjunctions that can be used for conditions, these buttons will be visible when we have one or more conditions, and when we have to add a new condition, the ‘And’ button will be visible. Likewise, the ‘Or’ button will be visible when we change its value.
- Column: This is the name of the column which fulfills the given requirement.
- Filter columns: This is the field that can be used to filter the data table by a column,
- Column selection mode: This option will also say whether we want to keep the row or remove it, which can be done by clicking on the radio buttons to keep and remove.
- Column: By using this option, we can keep or remove the column.
Row.
- Add/remove column:This field can filter the data table by a column; we have some options.
Conclusion
In this article, we conclude that the UiPath filter data table is how we can robotize the process of searching the column or rows by using specific conditions. We have also discussed the filter row and column and how we can use the filter data table.
Recommended Articles
We hope that this EDUCBA information on “UiPath Filter Data Table” was beneficial to you. You can view EDUCBA’s recommended articles for more information.