
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2020 09:23 AM
On a Catalog Item, in a new date variable - is there a way to set Default Value to current date and add (for example) 3 days from now?
Above example sets current date. But how can I add 3 more days in the default value?
My goal is to add days dynamic based on Delivery time (delivery_time) in the default value.
Lite this in portal:
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2020 09:40 AM
You can mention under default value
javascript:var gdt=new GlideDateTime();gdt.addDays(3);gdt.getDate();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2020 09:47 AM
Hey Henrik,
You can refer the answer suggested by Asif.
In case if you need something dynamic, you can do something like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2020 09:54 AM
Hi and thanks for the reply.
I guess the problem is to access the value in [delivery_time] on the catalog item, when I'm on the variable... Do you know if that's possible?
But as you say.. Creating a Script Include that's taking the sys_id of the current catalog item and returning the delivery time might be a solution.
I'll check that out.
With script include:
Please mark my answer as Correct/Helpful if it helps you to resolve your issue.
Thank You.
Regards,
Geetanjali Khyale
ServiceNow Developer