This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Workflow Automatic State Transition by calculated date

Former Member
Former Member
Hi

I was wondering if it is possible to define a automatic state change on a workflow based on a date, that has been calculated using an object's date property.

Regards

Yaney
Parents
  • You can calculate the difference between the timestamps (dates with time specified) using vb script function DateDiff, see www.w3schools.com/.../asp_ref_vbscript_functions.asp
    You have the timestamps in the Last modified property for each version. However, it would be a good idea to copy those timestamps into separate properties as a workflow action in each of the relevant states. The timestamp is probably not available at the time when the action script is run though. In stead you could just use system time Now to set the timestamp. Make sure you set the calculation order in the calculated field to make it work after the timestamp has been set.
    So, in Start State you create an action script that sets a timestamp for Start, and in End State you create an action script that sets a timestamp for End and add a property with a calculated value as the DateDiff between Start and End.
Reply
  • You can calculate the difference between the timestamps (dates with time specified) using vb script function DateDiff, see www.w3schools.com/.../asp_ref_vbscript_functions.asp
    You have the timestamps in the Last modified property for each version. However, it would be a good idea to copy those timestamps into separate properties as a workflow action in each of the relevant states. The timestamp is probably not available at the time when the action script is run though. In stead you could just use system time Now to set the timestamp. Make sure you set the calculation order in the calculated field to make it work after the timestamp has been set.
    So, in Start State you create an action script that sets a timestamp for Start, and in End State you create an action script that sets a timestamp for End and add a property with a calculated value as the DateDiff between Start and End.
Children
No Data