Switch Case based on values of Data table Column

Hi All,

I am trying to construct a switch case with the values based on a partial match with the values in a column in a data table.
Example- The column values of the data table are “pending with L1”,“Approval from L2”; then the cases should be L1; L2; default;

This is the value I used in the expression

If( Raw_DT(“STATUS”).ToString.Contains(“L1”), “L1”, If( Raw_DT(“STATUS”).ToString.Contains(“L2”), “L2”, If( Raw_DT(“STATUS”).ToString.Contains(“L3”),“L3”,If( Raw_DT(“STATUS”).ToString.Contains(“L4”),“L4”,“L5”))))

I am getting
the error “Option Strictly On disallows implicit conversion from String to Integer”

Hi @PriyaRK

You can use Regular Expression instead of a if query you used to find the L1, L2 in your column. Another thing is that check the TypeArgument property of the Switch case set it as a string or whatever you want !!!

Thanks !
This might be helpful for you :slight_smile:

@Abhishek_Vaidya1 Thanks!