Skip to main content
if(regexMatch('{{ticket.tags}}', "Step2"), if(regexMatch('{{ticket.tags}}', 'Manager'), "{{P1.root.requester.reporting_manager_id}}", "{{R3.namedapprover1}};{{R3.namedapprover2}};{{R3.namedapprover3}}"), if(regexMatch('{{ticket.tags}}', "Manager"), "{{P1.root.requester.reporting_manager_id}}", "{{R2.namedapprover1}};{{R2.namedapprover2}};{{R2.namedapprover3}}"))

I have created  this expression.  The test say it’s OK 
But I can’t click on done then I get “Invalid Syntax - Operands are mismatched.

 

My idea of this i to have one send approval block and use the result of this expression for how to send to. 

Tested a simpler expression and I get the same error if I have more then one placeholder in the “true” section of the if statement. 


The first fail when I try to save the node, second works. 
The difference is that I have more then one placeholder in the regexmatch expression. 
I have tested with . , - and space between the placeholders but same result.    

if(regexMatch('{{R5.approver1}}.{{R5.approver2}}.{{R5.approver3}}','{{ticket.requester.id}}'),
if(regexMatch('{{ticket.tags}}','Step2'),
if('{{R6.approvertype_value}}' == 'Majority' || '{{R6.approvertype_value}}' == 'Everyone',
0,
1),
if('{{R6.approvertype_value}}' == 'Majority' || '{{R6.approvertype_value}}' == 'Everyone',
0,
1)
),
0
)+{{E10.result}}


if(regexMatch('{{R5.approver1}}','{{ticket.requester.id}}'),
if(regexMatch('{{ticket.tags}}','Step2'),
if('{{R6.approvertype_value}}' == 'Majority' || '{{R6.approvertype_value}}' == 'Everyone',
0,
1),
if('{{R6.approvertype_value}}' == 'Majority' || '{{R6.approvertype_value}}' == 'Everyone',
0,
1)
),
0
)+{{E10.result}}

 


Thanks you,

Same issue 

In the if statement, I receive the same error if I have more than one placeholder in the "true" section.
 


Same issue here. Single if statement with multiple placeholders in the true and false return fields. Making both fields only have a single place holder allows me to save it, even when I can successfully test with the multiple placeholders prior.

Works with test but fails to save with “Mismatched Operands” error:

if( length("{{ticket.ri_5_cf_employee_preferred_first_name | strip}}")>0, "{{ticket.ri_5_cf_employee_preferred_first_name | strip | capitalize}} {{ticket.ri_5_employee_last_name | strip | capitalize}}", "{{ticket.ri_5_employee_first_name | strip | capitalize}} {{ticket.ri_5_employee_last_name | strip | capitalize}}")
Successfully tests but fails to save

Modified expression that saves without the error:

if( length("{{ticket.ri_5_cf_employee_preferred_first_name | strip}}")>0, "{{ticket.ri_5_cf_employee_preferred_first_name | strip | capitalize}}", "{{ticket.ri_5_employee_first_name | strip | capitalize}}")

 

Hopefully this can be fixed quickly.


Reply