Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax to be used in Advanced compare condition

vincenzo_spatafora
Contributor
May 30, 2025

Dear ALL,

where can I find the syntax to be used in "advanced compare condition" where the condition is that the value of a smart value (in my case a number) is between 2 values?

I have tried the following but it doesn't work:

 

advanced_compare.PNG

Thanks, Vincenzo.

2 answers

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 30, 2025

Hi @vincenzo_spatafora 

You may use either two Issue Field Conditions or use a single Advanced Compare Condition (with a conditional expression and the and() function.

 

Kind regards,
Bill

vincenzo_spatafora
Contributor
June 2, 2025

Hi @Bill Sheboy 

nice to read you again out.

Do you mean like this? (I get a parsing error):

Parsing_error.PNG

What is wrong?

Thanks in advance, Vincenzo.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2025

When already inside an expression with double-curly brackets, please do not add more.

Assuming your field is a number you could try this:

  • advanced compare condition:
    • first value: {{#if(and(issue.ComplAverage.gt(45), issue.ComplAverage.lt(50)))}}true{{/}}
    • condition: equals
    • second value: true

 

vincenzo_spatafora
Contributor
June 3, 2025

Thanks a lot @Bill Sheboy.

I see: I understand then you can not pass the smart value I have defined (ComplAverage); you got to pass the original issue (issue.fields.customfield_29300).

If so, something to be improved here.

Thanks again, Vincenzo.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 3, 2025

Just so I understand...were you using a Created Variable rather than the field directly?

If so, that explains the problem: Data Center's automation rules do not have the asNumber function yet (but Cloud does).  With that function, you could have used ComplAverage.asNumber and it would have worked.

 

Please consider marking this question as "answered" to help others with a similar need find solutions faster.  Thanks!

vincenzo_spatafora
Contributor
June 3, 2025

Thanks @Bill Sheboy

I see now.

Kind Regards, Vincenzo.

0 votes
arielei
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 30, 2025

Suggest an answer

Log in or Sign up to answer