We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

How to use a string litteral in an IF expression

Answered
long yu asked on February 18, 2022

Dear Flexmonster,
 
I'm struggling to create a calculated field in the web interface with a string litteral. If I put my string between quots, Flexmonster believes it's a column name.
 
Example : IF("some column" == 'my value',10,0)
meaning that if the data in "some column" is "my value", I want the result to be 10 or 0 otherwise. 
How to input "my value" in a way Flexmonster won't think it's a column name ?
 
Thanks

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster February 18, 2022

Hello,
 
Thank you for reaching out to us. 
 
Kindly note that comparing string members in the calculated value formula is not supported at the moment. 
We have added your request regarding string comparison to our customers' wishlist, and we will inform you in case of any updates regarding this feature. 
 
Currently, for such cases, we kindly suggest using the customizeCell hook approach to achieve the necessary output. Please check the following thread for reference: https://www.flexmonster.com/question/same-question-as-calculated-value-with-if-statement-comparing-string-values/. However, we would like to note that this approach may not work for all cases.
 
We hope it helps. Please let us know if you have any other questions.
 
Kind regards, 
Nadia

Please login or Register to Submit Answer