- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 01:50 AM
Hi All.
I am looking for assistance with defining a flow variable a date and timestamp in a new Chase Function I am desiging using Flow Designer.
I have defined the flow and it triggers as expected, waits a specific duration as expected, looks up the trigger record to check it still meets the criteria to update the trigger record as expected and then it updates a number if fields on the trigger record.
The issue I am having is getting a date and timestamp added to the trigger record which I want to populate a new "last chase sent" date and time field with the current time in local time.
The following flow variable returns the date and time in UTC:
Script:
Script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 06:43 AM
Hello @Damian Mudge
If you set the flow variable at the time of triggered it will same in whole flow where it used but if you want to change the flow variable value then you can change it also as per your need by set the value in flow designer of that particular variable
Please Mark Helpful
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 02:32 AM
Hello @Damian Mudge ,
Please try this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 03:05 AM
Hello @Damian Mudge
I just wanted need more clearity on above senerio, you just wanted to change the date formate that you get before in flow designer right ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 05:04 AM
HI Sanjay,
Thanks for the quick reply.
I am trying to get a script that can be used in multiple flow variables that can be compared to the system time / time now that are used in each step of a new Chase Function. The Chase Function is 4 step process as follows:
Step 1 First Chase: Workflow is triggered when a Ticket is placed "On hold". (A Business Rules set a "Chase Count" field to "0", 24hours later, a timer wakes up the workflow, looks up the record to get the latest information. If the Ticket is still "On hold" and the "Chase Count" is still "0", then the workflow action updates the Chase Count to "1" and populates the "Last Chase Sent" with the time now.
Step 2 Second Chase: 24hours later, the workflow wakes up, looks up the record to get the latest information. If the Ticket is still "On hold" and the "Chase Count" is still "1", then the workflow action updates the Chase Count to "2" and populates the "Last Chase Sent" with the time now.
Step 3 Third Chase: 24hours later, the workflow wakes up, looks up the record to get the latest information. If the Ticket is still "On hold" and the "Chase Count" is still "2", then the workflow action updates the Chase Count to "3" and populates the "Last Chase Sent" with the time now.
Step 4 Resolves Ticket: 24hours later, the workflow wakes up, looks up the record to get the latest information. If the Ticket is still "On hold" and the "Chase Count" is still "3", then the workflow action resolves the Ticket adding values for Mandatory fields and clears the Last Chase Sent, Chase Count.
Kind regards,
Damian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2024 03:09 AM
if you want the date in the desired date then you can use this below code snippet for the help and elsewise you can use the regex also to formate the date in your desired formate
var date= new GlideDate();//replace new GlideDate() with the incoming date var date2 = date.getByFormat('yyyy/MM/dd');//now use the date2 to set the field value