- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-11-2020 01:59 AM
we have created a test step on change management module, now our challenge is to set planned start/end date to be dynamic - like if I run the test step in march 3 then the planned start date is set to march 4 and planned end date is set to march 6 like this
we know it can be done with server script prior to the set field values step, but is there a way to do this in set field values step with help of coding/scripting
any help appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-11-2020 02:42 AM
Hi,
You can use "javascript:gs.daysAgo(-1)" for Planned start date and "javascript:gs.daysAgo(-2)" for Planned end date.
Regards,
Sai
Mark ā Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-11-2020 02:27 AM
Hi,
Unless you use custom step which is server side you cannot do this. Set field values for date would give static values to select. Once you create custom step for this and the output variable of that custom step is of type date then it would be showing as an option to select when you use set field values
Mark ā
Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
Thanks
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
ā02-11-2020 02:42 AM
Hi,
You can use "javascript:gs.daysAgo(-1)" for Planned start date and "javascript:gs.daysAgo(-2)" for Planned end date.
Regards,
Sai
Mark ā Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-11-2020 06:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-17-2023 07:14 AM
What if we want to set the value to 2 minutes from now. i tried using minutes instead of days in the formula but it isn't working for my ATF