Ignore Case Architect Expressions

I want to do a comparison of a string, but I want to ignore the case because I don't know what the case will be like. So for example, I have a Decision node in Architect doing this comparison:

Flow.Value == "value1"

I don't know if "value1" will come back as "vAlue1" or "Value1" or "valuE1", etc. I currently have my Decision set to this to compensate:

Flow.Value == "value1" or Flow.Value == "Value1"

That will cover my bases somewhat, but there are some scenarios where I'm looking for multiple words in a string. How do I check a string while ignoring the case?

Hi Michael,

You can use Upper() or Lower()
Upper() converts the variable to all upper case, Lower() converts it to All Lower case

so for your example it would be
Lower(Flow.Value) == "value1"

this way it doesn't matter how the Value is stored in the variable (Upper case, Lower case or a mixture), when it is compared to "value1" the variable is converted to Lower case

1 Like

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