I’ve generated table using “Data scraping” tool, Im trying now to filter the data table using value of WIID column < 500000, I’ve couldn’t get this code to work, I’ve tried:
kept 0 rows
kept 0 rows
I also want to mention that this is data table generated by scrapping so values are probably strings? Correct me if im wrong
Is the column “WIID” is a String or an Integer ? If it’s a String use
varWIID = Integer.Parse(“WIID”)
@zbigniew.lukowski Can you out put the data table which you are scraping and see what values you are getting.
@zbigniew.lukowski use an assign statement and pass the below value to get the filtered output in a datatable.Here it is specified for WIID>500000.
Datatablevariable=ExtractDataTable.AsEnumerable.Where(function(x) Cint(x(“WIID”).ToString)>500000).Select(function(x) x).CopyToDataTable
Thank you for replying , unfortunately solution produce Compiler error:
The only solution working was looping through each row and removing them if “IF” condition was met:
but it’s really not efficent.
Use this instead
ExtractDataTable = ExtractDataTable.select(“Convert([WIID],System.String) < 500000”).CopyToDatatable
Below xaml file
StringToIntergerDT.zip (18.8 KB)
Let me know if it worked for you ?
It works fine…
Please share your workflow…
I was surprised by this fact as well but checked in scope and its table:
What do you do before that ? Check weither you convert your DataTable somehow…
I’ve moved the activity below or commented it,but that doesn’t change the outcome of activity:
guys remember that we are in UiPath forum and he is trying to learn it, we should avoid offering coding solutions to do things that dont require it… @zbigniew.lukowski that column is of string type, you cant use that operator to filter it… your solution is perfectly valid, removing the rows you dont want, BUT, what are you doing with the rows that have WIID < 500000? Because you can simply put an IF condition and use the rows you need and ignore the rest…