Hi,
In the filter wizard how can I perform String manipulation on the value, such as ToLowercase?
I would rather avoid something like this:
Hi,
In the filter wizard how can I perform String manipulation on the value, such as ToLowercase?
I would rather avoid something like this:
That is one of the limitations of using the filter wizard instead of building the filter on your own. You can’t alter the value from the datatable. If you use your own then it’d be as simple as appending a .ToLower() to your select or where statement, but unfortunately it is not possible in the wizard as far as I know
It’s not the most elegant solution but depending on the size of the datatable you’re working with, using the For Each Row
activity is generally pretty quick.
I personally knew I was going to have to do a lot of proofing/editing datatables in my processes, so I built a custom sequence to split the table into 4 tables and then loop through them in parallel to modify the contents and then combine them into a single datatable again. doing this over a set of data that was 5col x 10000rows I had the following times:
single For Each Row
: ~2.8s
two For Each Row
activities in parallel: ~1.7s
four For Each Row
activities in parallel: ~1.6s
At a certain point with that little data splitting into more datatables became less of a benefit. So I only really see it being a large benefit when working with datasets comprised of ~50000 cells or more (not 50000 rows, but any combination of rows/columns that makes 50000 cells).
@rankifyhc as @Dave has mentioned a LINQ statement can help.
Use an assign activity
to: yourDataTableFilteredVar
Value: YourDataTableVar.AsEnumerable.Where(function ( r ) r(“Line Desc”).ToLower.Equals(“cloud solution”)).CopyToDataTable
Make Sure: