Filter data table activity is case sensitive

Hi,

As filter data table activity is case sensitive, is there any way we can convert it into upper or lower case?

Any idea?

Hi @Ray_Sha1,

You can Filter using Select query as well instead of Filter datatable, if you want to use the activity in the activity itself you can specify like value.toString.ToUpper.

Thanks

I’m using the data tables.
The filter data table activity is inside a for each row loop.
The value part of filter data table activity can convert as row.item(0). tostring.toupper

But the column part- where we put in the column name, how can that be converted?

Thanks!

As was said before, use this LINQ syntax to filter:

Assign
var_dt = var_dt.AsEnumerable.Where(function(x) x(“ColumnName”).ToLower.Equals(“YourCondition”))

Hope it helps!

Hi,

I have used the LINQ query.
I want it to have contains keyword.
The LINQ isn’t returning the required values.
This being the reason I’m using the filter data table activity method

Can you provide an example of your input file, and what condition are you trying to apply?

I’ll provide it in sometime.
Is there any alternative, Instead of using LINQ for filtering can’t we convert the whole column used in the filter data table activity to upper or lower?

You can use a for each loop and convert the values to upper first then write them on the same location in excel, post that read it again and perform your task.

Thanks

1 Like

Hey,
Thanks for the response.
The data table is very big.

Any LINQ query or select query to do that?

Thanks!

Let me provide an example, in my case, using different combinations of words and Lower/Upper cases:

  • Check if your condition is working as expected, for example if they have extra spaces (.Trim), or you’re checking .ToUpper but the condition is in lowercase… There can be multiple reasons why the Where function might not be working. But if the only difference is the lower/upper cases, it should work with Linq.

image

1 Like

LINQ gives us a good control and is a recommended choice to start with as it is adequate to your case description.

In case of something is not working on the first shot we just check for the root cause and get it working.

Once you have provided yiur sample data then we can start with

1 Like

Hey,

Thanks all for the help!
For LINQ, I’ll create a new thread

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