Filter DataTable activity?

I use filter dataTable activity as below.

I want filter column Type that value = ii or text ----> value from assign text.

I want to use 1 row in filter datatable.

Please guide me for solve it.

change to this

1 Like

@jack.chan Can use in same line ?

Because value I read from file config sometime have 1 value or more value.

can i see what the config looks like?

is it like this

“ii or text”

Hi @fairymemay
what @jack.chan
has mentioned will exactly suit your requirement

please proceed with that

answering ur question in single line its not possible

Hi @fairymemay,

Kindly try below mentioned

@jack.chan Yes. value = ii or text.
But sometime value ii.

@RajKumarDuraiFAS I want use 1 row in filter DataTable.


Hi @fairymemay

“OR” condition will work fr your requirement

i got ur requirement
kindly go with contains instead of “=”

1 Like

do this…@fairymemay this will handle 1 or more values and you dont have to change anything in the code
Sequence.xaml (7.6 KB)

this line of code lets us filter using 1 line:
dt = dt.Select("[Type]='ii' or [Type]='text'")

how to generate the above code??
example : config condition= “ii or text”

  1. declare list variable filterList and string filterString

  2. loop over System.Text.RegularExpressions.Regex.Split(condition, " or ").ToList , for each iteration add "[Type]='"+item+"'" to filterList

  3. assign filterString = String.Join(" OR ", filterList)
    now filterString = [Type]=‘ii’ or [Type]=‘text’

  4. finally you can filter datatable (this lets you filter in 1 line)
    dt = dt.Select(filterString)


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