Abudhahir
(Abudhahir)
August 2, 2019, 2:20pm
1
Hi All,
I have excel it has a Value =“True” and “False”. in Column E and F and G.
I want to filter only true values by using the coding. can you help me on this.
I used this, it filter only Column E while I try with multiple columns its through error.
Dt.Select(“Coulmn E=”&Value).CopyToDataTable
Notes: I have created Variable Value='True".
lakshman
(Ganta lakshman)
August 2, 2019, 2:23pm
2
@Abudhahir
Try this:
DT.Select("ColumnName = '"+Value.Tostring+"'").CopyToDataTable
Hi @Abudhahir
You can use Filter Data Table activity for that one.
Thanks and regards
2 Likes
Abudhahir
(Abudhahir)
August 2, 2019, 2:25pm
4
Hi Brian,
I plan to use via coding.
1 Like
Hi @Abudhahir
Try using the below code for multiple filtering
With variables
Dt.Select(“Coulmn E= '” + StringValue + "' AND ColumnName = '" + StringValue + "' ").CopyToDataTable
Without variables using hard coding
Dt.Select(“Coulmn E= 'True' AND ColumnName = 'False'").CopyToDataTable
Let me know whether it helps
3 Likes
Hi @Lahiru.Fernando ,
when I try using the code with variables I got this error : Assign: Syntax error: Missing operand after ‘number’ operator.
Could you kindly help me?
Thank you