- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 02:17 AM
I want to auto-populate a field using catalog client script.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 02:30 AM
From what I have understood from your question, you want to auto-populate a field date with a date that is 15 days prior to the date selected.
you can use GlideDateTime to perform date operations,
firstly create a GlideDateTime object and store that to a variable (this will have the current date value).
now create another variable and use .addDayUTC(<no of days to be added>) (this will have the updated date value).
now set the second variable to the field in which you want to auto-populate the date.
thanks,
Afrith.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 02:25 AM
Hi
Please refer to the below link.
If my response is helpful, then Please mark it as Correct Answer/Helpful.
Please check and let us know.
Thanks 🙂
Shakeel Shaik.
Shakeel Shaik 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2022 02:30 AM
From what I have understood from your question, you want to auto-populate a field date with a date that is 15 days prior to the date selected.
you can use GlideDateTime to perform date operations,
firstly create a GlideDateTime object and store that to a variable (this will have the current date value).
now create another variable and use .addDayUTC(<no of days to be added>) (this will have the updated date value).
now set the second variable to the field in which you want to auto-populate the date.
thanks,
Afrith.