Hello,
I need update a date when I created and updated a doc. For that, we make this automation chain :
/>
Fetch > Context Document
Document > Update Property (value: @{Document["mydocumenttype:expiring_date"].clone()}; xpath: mydocumenttype:recall_expiring_data; save: true)
Scripting > Run Script (Document[ 'mydocumenttype:recall_expiring_data'].add(2,-Document["mydocumenttype:duree_preavis"]);)
Document > Save
It's ok for created a document but if I use this automation chain when document updated, it loop !
So I want create an other automation chain when document updated which :
/>
- test if
Document['mydocumenttype:recall_expiring_data']
!=
Document['mydocumenttype:expiring_data'].add(2,-Document["mydocumenttype:duree_preavis"]
- if different then I update "recall_expiring_data" with Document[ 'mydocumenttype:recall_expiring_data'] = Document['mydocumenttype:expiring_data'].add(2,-Document["mydocumenttype:duree_preavis"]);)
What is the syntax for this test ?
Thanks in advance !