Filter a data table if contains



Hi everyone!

I need to filter a datatable if the column “result” cointains the string “ok”.

How can i do?

Thank you


Hey @Siltra,

You can use filterDataTable activity :slight_smile:
Just fill in the appropriate values



I update all my packeges but I dont’t have this activity :frowning:

Is it possible by select method?


It should be under Data Table heading in the activities column!!


this is what I have…


That’s a bit weird.There should be like 10 more activities there!

Anyways, you can do it with select too…but still you’ll require Add Data Column activity which i again don’t see there!
Try reinstalling the UiPath.Database.Activities package…It’ll be difficult to work without those activities!
Should look like this!


I have Add Data Column Activity. How can I use this to filter data table?



Hello @Siltra,

Please refer to the workflow i created for you :slight_smile:
So what we can do is use select to get the data rows that have result column value ‘ok’
Select returns an array of data rows.
Then we can build a new datatable and through foreach and add data row add the filtered rows in the new data table!Main.xaml (11.3 KB)


Thank you very much for your helping, but the I need rows where column result CONTAINS the string ok, so I can’t use equals operation.


Because you need a contains and not an equal to, I would build a second datatable and loop through the first. Each time it comes across a value containing “OK”, add that row to the second datatable.


So is not possible to do it without a loop only using the select method? I just to count the number of rows, so I don’t need to build the data table after this operation.


Hi @Siltra, the filter data table options are available in version 2018.2.0. May be try to install the latest version. It might work. .!!



Hey @Siltra,

You can try using dt.Select(" result=’* ok *’ " )
it will get you the rows having


Hi - You can filter the DataTable like this.

here outDt is a dataTable Variable.

Thank you,


I tried using dt.Select(“result LIKE ‘%ok%’”)
Works just fine! :slight_smile: