Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Expressions: multiple conditions
#1
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
But that doesn't yield the desired result (I get some fatal error). Is this even possible and if so, how? And if it's not, is there another solution, other than writing a custom validation?
Reply
#2
Try with

if AND(pending_tc_recordcount > 0, lm_status = 'thetriggeringstatus') then 0 else 1 end
Joe
TSolucio
Reply
#3
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
Reply
#4
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)
Joe
TSolucio
Reply
#5
or try with >
Joe
TSolucio
Reply
#6
in short: this works, I have seen it a lot before
Joe
TSolucio
Reply
#7
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.
Reply
#8
Sorry, for that, but very happy it worked!
Joe
TSolucio
Reply
#9
No problem, just glad I got it to work
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)