Expressions: multiple conditions - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17) +--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8) +--- Thread: Expressions: multiple conditions (/showthread.php?tid=2137) |
Expressions: multiple conditions - Guido1982 - 04-14-2021 Follow the previous post I created a validation map that evaluates a condition expression map. I want to trigger the validation only when a certain picklist value is selected, so Code: if (pending_tc_recordcount > 0 && lm_status = 'thetriggeringstatus') then 0 else 1 end RE: Expressions: multiple conditions - joebordes - 04-14-2021 Try with if AND(pending_tc_recordcount > 0, lm_status = 'thetriggeringstatus') then 0 else 1 end RE: Expressions: multiple conditions - Guido1982 - 04-15-2021 Sadly, that also leads to a fatal error Code: Uncaught Exception: Was expecting a closing bracket in /PATH/public_html/rolodek/CRM/modules/com_vtiger_workflow/expression_engine/VTParser.inc:136 RE: Expressions: multiple conditions - joebordes - 04-15-2021 try it in the workflow editor, make sure the expression works there and then copy it to the map. note the in XML you may have to use CDATA for the bigger and lesser than operators (I don't remember) RE: Expressions: multiple conditions - joebordes - 04-15-2021 or try with > RE: Expressions: multiple conditions - joebordes - 04-15-2021 in short: this works, I have seen it a lot before RE: Expressions: multiple conditions - Guido1982 - 04-20-2021 The solution was if AND(pending_tc_recordcount > 0, lm_status == 'thetriggeringstatus') then 0 else 1 end Mind the double equals sign. Damn expression language tripped me up again. RE: Expressions: multiple conditions - joebordes - 04-20-2021 Sorry, for that, but very happy it worked! RE: Expressions: multiple conditions - Guido1982 - 04-22-2021 No problem, just glad I got it to work |