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.
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
@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
@jack.chan Yes. value = ii or text.
But sometime value ii.
@RajKumarDuraiFAS I want use 1 row in filter DataTable.
i got ur requirement
@fairymemay
kindly go with contains instead of “=”
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”
declare list variable filterList and string filterString
loop over System.Text.RegularExpressions.Regex.Split(condition, " or ").ToList
, for each iteration add "[Type]='"+item+"'"
to filterList
assign filterString = String.Join(" OR ", filterList)
now filterString = [Type]=‘ii’ or [Type]=‘text’
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.