Update date in automation chain


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 !

0 votes

1 answers



0 votes


I read your link but I have a question : where is the operation "Execution Flow > Run operation". I don't have this in the list "Execution Flow". Does I have to create it ? Where ?

Thanks in advance


Hello Delphine, you're right, this operation is not provided anymore but as you can see there's a Run Chain operation. Maybe you can use separated chains and call one or the other with the ternary operator ? Have a nice day

Thank you !!! I didn't understand that it had put the test into ID. It works !