- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 05:05 PM - edited 11-24-2022 12:01 AM
I am trying to create a flow in ServiceNow to update the **Next Action Date/Time** field to be;
the case's created date/time + 30 minutes
My assumption/logic is based on the information in the URL Date Time Transform Functions
So what I did was include a flow step to update the Next Action Date/Time with the case's Created value (data pill) then apply an Add Time transform to the Created value by adding 30 minutes.
I also included an unmodified/untransformed copy of the Created value in the Next Action Activity field for reference.
The image below is the output of the flow, the date/time boxed in red in the transformed Created value which should have been only 30 minutes greater than the unmodified/untransformed Created value boxed in green.
I am assuming I am doing exactly the same thing as described in the original ServiceNow information page, but I don't know what I am missing?
Any insight, would be appreciated.
Looking at the output again, I see that the format of the two times is different. But the source is the same for both - so again not sure what is going on here.
I did some further triage by dumping various times and transformations into the case's work note to see if it reveals the issue, but I'm more confused now, see below
Opened: 24-11-2022 12:19:39
Opened (transformed Date to String-ServiceNow): 2022-11-24 01:19:39
Opened (transformed Date to String-ISO): 2022-11-24T01:19:39Z
Opened (transformed+30min): 2022-11-23 17:49:39
Created: 24-11-2022 12:20:19
Created (transformed Date to String-ServiceNow): 2022-11-24 01:20:19
Created (transformed Date to String-ISO): 2022-11-24T01:20:19Z
Created (transformed+30min): 2022-11-23 17:50:19
Did some more triage.
In the image below, I changed the flow so it updated the Next Action Date/Time field with the **Opened** value (unmodified). The result is that the correct time is displayed.
Then I updated the flow, this time I applied a transform to the **Opened** value and applied the **Add time** transform, but I set all the values to 0 i.e. add 0 days, 0 hours, 0 minutes, 0 seconds. In theory it should have been the same result, the **Opened** value.
But it wasn't, there must be something wrong functionally with my ServiceNow environment.
Has anyone seen this type of symptom, behaviour before? What was the root cause?
Me again, as a workaround, I going to try substituting the data pill + transform method with a script.
I found that the following will insert the case's Opened value into the Next Action Date/Time field correctly, I just need some help on how to add x minutes to this time, i.e. +30 minutes to the opened_at time
regards
Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 10:58 PM
Please use the code snippet to populate the value
Thanks & Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 10:58 PM
Please use the code snippet to populate the value
Thanks & Regards,
Vasanth