Publié Wed, 20 Mar 2019 17:18:15 GMT par Casey Miller Director of Technical Services
I have a workflow setup that when the application is approved it autofills an Approved Date field with current date. is there a way in the workflow manager that we can also fill in the Expiration Date? I can't figure out how to calculate this? It is 3 years after approval date.
Publié Wed, 20 Mar 2019 17:23:46 GMT par Phil Robson DocuWare Corporation Senior Director Professional Services, Americas
Casey,
2 Date variables required - GV_APPRO_DATE and GV_EXP_DATE.

GV_APPRO_DATE = CURRENTDATE
Assign this in a a data assignment step.
Create a new data assignment step (don't try to do these in one step).

GV_EXP_DATE = DATEADD("yyyy",GV_APPRO_DATE,3)

This will add 3 years to the approval date.


Phil Robson
Senior Director Support Americas
 
Publié Wed, 20 Mar 2019 17:25:53 GMT par Casey Miller Director of Technical Services
Great information. Thanks, Phil!
Publié Fri, 22 Mar 2019 15:16:25 GMT par Casey Miller Director of Technical Services

Phil, i have tried this but it isn't validating. This is the error it is giving me. See attached.

Publié Fri, 22 Mar 2019 15:29:06 GMT par Phil Robson DocuWare Corporation Senior Director Professional Services, Americas
Well that's plain unfair, because I reversed the criteria. Oops.

Try this:  DATEADD("yyyy",3,GV_APPRO_DATE)


Phil Robson
Senior Director Support Americas

 
Publié Mon, 30 Mar 2020 12:44:57 GMT par Koen Logghe Technical Support Specialist Software
Dear Phil, 
Thanks for this explaination, I would like to add some days, e.g. 5 to my date.
I should expect below command is for that:
DATEADD("dd",5,GV_ApproveDate) 

But I receive below error:
 [2: ExpiredDate] Invalid Argument Value for argument Interval: [DD]

Can you please tell me where is the wrong ?
Best regards,
Koen Logghe

 
Publié Mon, 30 Mar 2020 13:34:11 GMT par Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hi Koen,

you are using the wrong syntax. Please refer to this page: DateAdd in VBA
Your command should be:
DateAdd("d",5,GV_ApproveDate)

Hope this helps.

Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant
Publié Mon, 30 Mar 2020 14:35:42 GMT par Koen Logghe Technical Support Specialist Software
Hi Simon,
Thanks a lot, this helped me out !

Best regards,

Koen Logghe
 

You must be signed in to post in this forum.