When we tried below code it is not working properly in AJO JSON. Anyone know how do we check date > 1 or date < 14
{{#each profile._nordea.Trigger.Triggers as |ABC|}}
{%#if ABC.triggerName="trg_UAT_NCCL" and (ABC.dateAttribute02.getDayOfYear() <= currentDayOfYear())%} {"content_id":"UAT"}
{%/if%}
{{/each}}
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @DBoro ,
Can you check the following way -
{{#each profile._nordea.Trigger.Triggers as |ABC|}}
{% if ABC.triggerName == "trg_UAT_NCCL" and (ABC.dateAttribute02.getDayOfYear() <= currentDayOfYear() and (ABC.dateAttribute02.getDate() > 1 or ABC.dateAttribute02.getDate() < 14)) %}
{"content_id":"UAT"}
{% endif %}
{{/each}}
In this code, the if statement checks whether the triggerName is equal to "trg_UAT_NCCL" and the day of the year represented by dateAttribute02 is less than or equal to the current day of the year and also the date is either greater than 1 or less than 14.
If these conditions are met, then the JSON object {"content_id":"UAT"} will be output.
Hi @DBoro,
Something like this I tried and it's working,
{%#if profile._repo.createDate.getDayOfYear() > 1 or now.getDayOfYear() < 14 %}
{{profile._repo.createDate}}
{%else%}
This is test
{%/if%}
Thanks!
Hi @DBoro,
Was the given solution helpful for you in resolving your query or do you still need more help here? Do let us know.
Thanks!
Views
Replies
Total Likes
Hi @DBoro ,
Can you check the following way -
{{#each profile._nordea.Trigger.Triggers as |ABC|}}
{% if ABC.triggerName == "trg_UAT_NCCL" and (ABC.dateAttribute02.getDayOfYear() <= currentDayOfYear() and (ABC.dateAttribute02.getDate() > 1 or ABC.dateAttribute02.getDate() < 14)) %}
{"content_id":"UAT"}
{% endif %}
{{/each}}
In this code, the if statement checks whether the triggerName is equal to "trg_UAT_NCCL" and the day of the year represented by dateAttribute02 is less than or equal to the current day of the year and also the date is either greater than 1 or less than 14.
If these conditions are met, then the JSON object {"content_id":"UAT"} will be output.