score:2

Accepted answer

d1.asenumerable.where(function(x1) cint(x1("salary"))>500).copytodatatable

or

d1.asenumerable.where(function(x1) x1("salary")>500).copytodatatable if the salary column is already an integer

you may need to add assembly reference as system.data.datasetextensions if drop down does not appear after you type d1.asenumerable.

score:0

filter with linq:

(from row in yourdatatable.asenumerable where cint(row("price").tostring) > 500 select row).copytodatatable

if you found error message:

asenumerable is not a member of 'system.data.datatable'

please add reference below to your xaml file.

<assemblyreference>system.data.datasetextensions</assemblyreference>

reference: https://forum.uipath.com/t/asenumerable-is-not-a-member-of-system-data-datatable/69198/2?u=akkapolk

score:0

you can also work in a function method approach to linq rather than a sql-like syntax.

dt_data = dt_data.asenumerable.where(
  function(x) cint(x("price")) > 500
).copytodatatable

you can treat data in the datatable with .select(func) returning you a collection of however you treat the data.


Related Query

More Query from same tag