
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 05:00 PM
I have a catalog item where the user provide date variable, and the requirement i have is to take this Date let's say (31/03/2022) and convert it to (31/03/2022 11:59:00) - the time is fixed meaning that it will always be 11:59:00 regardless the date input, then update the SC_Req_item.Due_date with the new date/time (31/03/2022 11:59:00)
The flow is created by the flow designer.
Can you help me with how to do this and if it requires a script in the flow designer can you help with the script too
Solved! Go to Solution.
- Labels:
-
Flow Designer
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 10:08 AM
Hi,
update as this
if (fd_data._1__get_catalog_variables.question1 == "yes") {
return fd_data._1__get_catalog_variables.date + ' 23:59:00';
}
else {
return fd_data._1__get_catalog_variables.date + ' 17:00:00';
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 08:22 PM
Hi,
you can use f(x) inline script to set the due date
You can use Update Record action and script it
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 03:31 AM
Can you help me and share how the script would look like
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 04:20 AM
Hi,
Like this
1) I assume you are using Get Catalog Variables step to fetch the variable information
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2022 09:53 AM
Can you help me with one last question, I was hoping to build some logic on the script but it's not functioning properly
question1 is basically Yes/No variable and based on the answer I need to populate a different date