Hi All,
I'm struggling with something that should have been very easy, and it probably is, but I'm just not seeing it
I'm also sure someone has probably asked this question before, but I can't seem to find it. So, here I am.
I have an automation rule that generates an email triggered by a schedule, which queries some issues.
To keep this simple, all I want to do is determine if a number is odd or even and write the string "odd" or "even."
I started with the following in the content of my email:
{{#issues}}
Issue index = {{index}}
{{/}}This returns just what I expected, a list of issue index values:
Issue index = 0
Issue index = 1
Issue index = 2
Issue index = 3
In order to determine if the index is odd/even, I do some math:
{{#issues}}
Issue {{index}} = {{#=}}({{index}} % 2){{/}}
{{/}}The results:
Issue 0 = 0
Issue 1 = 1
Issue 2 = 0
Issue 3 = 1
So far, so good! Now I just need to evaluate the odd/even numeric value right? (only evaluating odd to keep it simple)
{{#issues}}
Issue {{index}} = {{#if(equals({{#=}}({{index}} % 2){{/}},1))}}Odd{{/}}
{{/}} Unfortunately, this is where I hit the wall and get the error:
Error rendering smart-values when executing this rule:
Mismatched start/end tags: null != in template-11fdf479-9202-4944-accc-
bca5fa38ba64:4: {{#issues}} Issue {{index}}
= {{#if(equals({{#=}}({{index}} % 2){{/}},1))}}Odd{{/}} {{/}}
I have tried every permutation, method, conversion, and prayer that I can think of and nothing gets me the simple little word of "odd."
Where am I going wrong!? THANK YOU!