- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 03:54 PM
I have a request that I think should be possible, but I'm having trouble trying to figure out how to accomplish it in the Flow Designer and was wondering if anyone had an idea on this.
What I have is a group that wants tickets submitted for them to take a look at the person's start date, and set the due date of the ticket to the next Thursday after their start date. I couldn't quite see how to do this. The only thing I accomplished was I took the date, and added 3 days since the most common start date was going to be a Monday.
I think there should be a better way to accomplish this, but I suspect I'm missing something, perhaps someone can point me in the right direction?
Thank you in advance for any and all suggestions.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 09:43 PM
Hi @Travis Michigan,
You can use the script to get the next Thursday instead of inbuilt functions.
Below is the code:
var currentDate = new GlideDateTime(fd_data.trigger.current.due_date); // here pass the date from which you want to calculate next thursday
var time = currentDate.getTime();
var a1=currentDate.getDayOfWeekUTC();
var delta = 4;
if(a1 == 7){
delta=11;
}
currentDate.addDaysUTC(7-a1+delta);
var newD = new GlideDateTime(currentDate.getDate());
newD.add(time);
return newD.getDisplayValue();
This will give you next thursday.
I hope it will answer your query.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2023 09:43 PM
Hi @Travis Michigan,
You can use the script to get the next Thursday instead of inbuilt functions.
Below is the code:
var currentDate = new GlideDateTime(fd_data.trigger.current.due_date); // here pass the date from which you want to calculate next thursday
var time = currentDate.getTime();
var a1=currentDate.getDayOfWeekUTC();
var delta = 4;
if(a1 == 7){
delta=11;
}
currentDate.addDaysUTC(7-a1+delta);
var newD = new GlideDateTime(currentDate.getDate());
newD.add(time);
return newD.getDisplayValue();
This will give you next thursday.
I hope it will answer your query.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2024 03:20 AM
Hi Nootan Bhat,
In my flow design i have planned start date and end date only i need to display only Monday date in that week
- Planned Start Date = Same week as the Planned Start Date on Monday at 8 hr
- Planned End Date = Same week as the Planned End Date on Monday, at 18 hr
how to do please can you help me
Thank you,
basine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2024 03:04 AM
Hi @Travis Michigan,
current.due_due_date in flow design it won't work it will through error for current , so you have to use instead of current like example below
fd_date._1_getcatalog_variables.due_date
Thanks & Regards,
Bandi