613
Views
7
Comments
Solved
Case insensitive in Outsystems
Question

Hi Community,

I like to check if the message I receive is "OK" in a IF condition. But I would like it case insensitive so that "ok" is acceptable as well. 

Any idea how?

2018-10-29 08-31-03
João Marques
 
MVP
Solution

Hi Alvin,


You can compare ToLower(Message) = ToLower("Ok").

In this way, you ensure you are comparing lower case with lower case.


Hope it helps.

Cheers,

João

UserImage.jpg
Alvin Teo

João Marques wrote:

Hi Alvin,


You can compare ToLower(Message) = ToLower("Ok").


Hope it helps.

Cheers,

João

 Hi João

Will the above work for the following "OK", "Ok", "ok", "oK"?

 

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Alvin,

In addition to João solution statement, I would also suggest you to use Trim pre-defined function (to remove additional white spaces) in case of  string value comparison 

ToLower(Trim(Message)) = ToLower("Ok")


Regards,

Benjith Sam

UserImage.jpg
Alvin Teo

Benjith Sam wrote:

Hi Alvin,

In addition to João solution statement, I would also suggest you to use Trim pre-defined function (to remove additional white spaces) in case of  string value comparison 

ToLower(Trim(Message)) = ToLower("Ok")


Regards,

Benjith Sam

 

 Thanks Benjith!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.