- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2024 01:12 AM
Hi,
In Servicenow ATF whenever i run the ATF by default i want to set the date as today's date.
In the above screenshot if i run i am putting the date but if i run the same ATF after 10 days it will get error because whenever i run the ATF i want to put the today's date.
If any possibility please help me out on the same.
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2024 12:51 AM
Sure.
Open your step 7 Set Field value.
In the Alarm start field write this javascript code.
javascript:gs.daysAgo(-10)
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2024 03:24 AM
Hi @kranthi2
Write a server side script before the setvalues.
In that server script bring todays date
In the set values in the alarm start map it to the return value of server side script step.
Please mark correct if my response has solved your query.
Cheers,
Mohammed Basheer Ahmed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2024 11:14 AM
Hi @Basheer
Thanks for the response, kindly help me out with the script please. i am new to the ServiceNow.
If you can help me out that would be really helpful.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2024 02:06 AM
Hi @kranthi2
Use javascript
javascript:gs.daysAgo(-7)
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2024 10:56 PM
Hi @Shaqeel
Sorry for the delay in my response, thanks for the response.
Please help me out on which ATF test steps should i need to write this script.
Thanks,