Create a catalog task based on requested item variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 03:58 AM
I have a requirement to create a catalog task based on a requested item variable:
The catalog item is for users to use when staff are leaving, but the issue I have is that all the tasks are generated at the time of the request being submitted (normal behavior) but in some cases this can be for example a month in the future and then we have tasks sitting in queues for say a month with no action needed.
Is it possible to generate these tasks based on the date used on the catalog form?
So if for example someone is laving on the 01/05/23 then these tasks are created at that time.
Hope this is clear any ideas or suggestions would be greatly appreciated
Thanks
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 04:00 AM
Hi @Alex Saager1 ,
You can use the solution mentioned : https://www.servicenow.com/community/developer-forum/create-a-catalog-task-when-a-catalog-item-varia...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 04:22 AM
you can use workflow timer activity and wait till particular date and then trigger the catalog task once the date is reached.
add this script in the timer advanced activity
var terminationDate = current.variables.termination_date.getDisplayValue();
answer = gs.dateDiff(new GlideDateTime(), terminationDate, true);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 06:20 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2023 06:24 AM
I'll be implementing this into our dev environment next week so after testing I will update accordingly.
Many thanks,
Alex