Hongkunliang
2 years agoQrew Cadet
Jinjia question
Hi, I am not familiar with Jinjia. I am trying to generate several child records by using Pipeline. The 1st child will get a date "9/21/2023", 2nd one will get "9/22/2023", and so on. However, it always give the value "9/21/2023" for all the children. This is my Jinjia code:
{
"to": "btib9aemmh",
"data": [
{% set adate=time.today%}
{% for num in range(5) %}
{% set adate=adate+time.delta(days=1)%}
{
"7": {
"value": "{{a.id}}"
},
"18": {
"value": "{{adate|date_ymd}}"
}
}
{% if loop.last == false %},
{% endif %}
{% endfor %}
]
}
Thanks in advance!
------------------------------
Hongkun liang
------------------------------