How to use filter Datatable activity

Hi All Friends,

I am getting one error while using Filter Datatable activity in Ui Path . I am reading data from excel and storing into datatable but on filter datatable activity I am getting below error .Please find attached error for this activity . want to filter the datatable based on Colum Name " Salary"

Thanks and ragards,
Varun Shinde

@varun_shinde1

Can you please share screenshot of the column names you passed here. So that we can check and help you.

Hello @varun_shinde1,

Inside the Filter Datatable activity, you need to provide the Input DataTable and you need to provide the COlumn Name as Below. Also, you need to provide the value to filter as well.

image

So you can write in filter datatable as “Salary” check if it have any whitespaces in excel

Also, you can use index of Column, you can write as 2 in Column also

Hope this may help you

Thanks

Hi Srinin,

now I am not getting Error in Filter Datatable activity . now i am getting one Issue as after filtering datatable I am trying to get the result in one data table variable using output datatable activity and after that i am trying to get that datatable value printed .but in output console i can see only header name not data. please find screenshot for this.

@varun_shinde1

Can you share the screenshot of what you have placed by clicking on Configure Filter ?

Thanks

hi i have managed white spaces so no error regarding this .
i guess some error in filter datatable . please find below screensot i want to get filtered all data based on salary .


@varun_shinde1

Don’t put double quotes, just place 30000

If you place double quotes then it become string

Hope this may help you

Thanks

1 Like

Hi srini,

Firstly it was witgout quotes “”. But i added later but still it is giving same output that is with headers only with no data

@varun_shinde

Try using this then

Take an assign activity and write as below

FilteredExcelData = (From a In ExcelData.AsEnumerable where Convert.toInt32 (a (“Salary ”)) > 30000 select a).CopyToDataTable

Hope this may help you

Thanks

Hi Srini,

this really helped me a lot. Please tell me how i can enhance VBA and VB.net skills. Again Thanks a tonn !! for help !!

Best Regards,
Varun

1 Like

@varun_shinde1

Glad, it worked for you

If you want to upgrade your skill first go with basics of VB.Net below link will help to learn
VB.Net Programming Tutorial

Also there are many videos in youtube where you can get on VB.Net as well

If your issue is resolved, please close this thread by clicking Mark as solution on the post

Thanks

1 Like

make sure the columns are getting read , did you checked add headers while using read range ?

Hi @varun_shinde1
Please try this
image

When your excel column formatting is in “General” we need to use the decimal values in filter datatable

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.