Timer with start date and time in workflow is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 01:31 AM
Hi,
I am using a timer with wait for condition as start date and time (PST hours). I used the below script for start date condition and it worked but when I changed variable type to Date/Time, the timer condition is not working when user selects date and time (PST hours). Could someone please help with the below script?
var start_date = new GlideDateTime(current.variables.start_date);
answer = gs.dateDiff (gs.nowDateTime(), start_date,true);
The above script is working for selected date but not working for data along with time (pst hours). Please provide your suggestions.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 01:40 AM
Do I need to set any time zone like mentioned in the screenshot to trigger start for date and time? Please assist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 01:46 AM
Hello @saran raj , I think when it is changed to date and time it is taking seconds also into count and it is not matching the time i guess in wait for condition.
May be use timer activity for this as timer activity counts in every second to satisfy the condition and move the workflow forward .
Hope this helps
Mark my answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 02:16 AM
Hi @Mohith Devatte, The condition worked for date selected for past and future dates but after changing the variable type to Date/Time from Date format, the timer is not working with time selected. The workflow should trigger when user selects the date and time in catalog form and based on this, the timer should trigger. Hope you understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2023 01:46 AM
Hi @saran raj,
This must help !
I hope this help !
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....