Publié Fri, 22 May 2020 16:44:50 GMT par Farzali Babekhan Solution Integrator
Hello

-I have three Fields in my DocuWare form,  One of them is called Expiry Date (that will be selected),  another field called  Notification Period (it has number of months listed,  ex.  1 month, 2 mnoths, etc.).    I have another field that is called Notification Date  (This field is the result field)

-The idea is to  to subtract  notification period value (by 1 month  up to 12 month), from Expiry Date and insert the resulting information into Notification Date Field.

-I am new to DocuWare and I tried to do this from on Forms and Workflow designer with no success.   I could use some help on this.


Thank you so much

 
Publié Wed, 27 May 2020 07:06:07 GMT par David Barlet Technical Manager
Hello,
You can do that with arithmetics function within workflow. You have the function DateAdd(). You can use this function to substract month with negative number -> NotificationDate= DateAdd(DateInterval.Month, -NotificationPeriod, ExpiryDate).
All function are available here: 

https://www.docuware.com/main.asp?sig=dld&lan=en&loc=en&dwdblan=english&dwdbkat=do*&dwdbname=%20Workflow%20Expression%20Parser%20DocuWare%20V7.1&utm_campaign=PartnerInfo&utm_source=hs_email&utm_medium=email&utm_content=73140710&_hsenc=p2ANqtz-9VE1bfrL5TIAyoSQNWgsZytJ2qMx0_jq489UWOUttHNVMR-zC0EfmjIE3nKVQtok5AUtlqBht1wpKSo1KGcRQNaI4DjPJ8kB9VRE3NwQ1mTV6H4h0&_hsmi=73140710


Best regards,
David
Publié Wed, 03 Jun 2020 18:38:34 GMT par Farzali Babekhan Solution Integrator
Thanks David   

Initially I couldn't subtract Notification Period field value from expiry date.  Since the form field was drop down, workflow was not accepting the value treating it as string.   With the help of a developer,    I used the following to get it working:      DateAdd(DateInterval.Month,-cint(DW_NOTIFICATION_PERIOD),GV_ExDate) .   




 

You must be signed in to post in this forum.