How to filter the datatable?
DT:
S No City ID City Name
1 500045 Hyderabad
2 500016 Banglore
3
4 500086 Mumbai
5 500075 Vizag
6 500045 Hyderabad
7
8 500023 Delhi
9 500045 Hyderabad
Hey @Girid ,
You can use filter datatable and remove all the blank rows by giving a condition
Or u can use linq
DT.AsEnumerable().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value OrElse field. Equals(“”))
hope it helps you out!
Thanks for your reply, Filter datatable worked.
Also i tried your linq but i go error as
‘DT’ is not declared. It may be inaccessible due to its protection level. Variable ‘DT’ is missing. Please use Data Manager to recreate it. Main.xaml
Ensure that you have declared the DataTable variable DT
in the correct scope in your UiPath workflow.
If you are using some other datatable name, then kindly replace the name DT in linq with your datatable variable
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.