How To Use "IF" function that contains two specific text


#1

Hi all,

I like to use function “IF” that contains two specific text but the data i get from get row item
for example.
The data in the get row item are
999-NO
999-NOT
The condition is if the row item contains no or not then proceed to another activitiy

what syntax i can use for the condition?

Sorry for my poor english.

Thank You

Delf


#2

Hi @delf,

So in this case you case use
In if condition you can give like this
StrValue.ToString().ToUpper().contains("999-NO")

Regards,
Arivu


#3

@delf,

This one gives true for both.
Instead use either one

  1. StrValue.ToString().ToUpper().contains("999-NOT")
  2. StrValue.ToString().ToUpper().Equals("999-NO")

Regards,
Dom :slight_smile:


#4

Hi Arivu,

thanks for reply
so my understanding is like this
in the condition IF fill
StrValue.ToString().ToUpper().contains(“NO”) or StrValue.ToString().ToUpper().contains(“NOT”)
or is this condition that i found earlier can be used?
Var_ref_no.Contains(“NO”) or Var_ref_no.Contains(“NOT”)
assuming var_ref_no is the output of get row item

Thank you

Delf


#5

@delf,

You can’t use this as both your input contains NO in your case.

Regards,
Dom :slight_smile:


#6

Hi @delf,
If you want contains means you can use one

This one is enough, it will become true for both the condition.

Regards,
Arivu


#7

Thanks arivu for the solution. Already tried and worked.

Thanks