- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-05-2025 07:28 AM
If date is past then status will show deployed otherwise it show inprogress in servicenow
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 01:30 AM - edited ‎02-06-2025 01:31 AM
Hi @gy891815
Not clear with you requirement, but you can try following imaginary script in your BR:
(function executeRule(current, previous /*null when async*/) {
var currentDate = new GlideDateTime();
var incidentDate = current.Name_of_date_field;
if (incidentDate <= currentDate) {
current.incident_status = 'Deployed';
} else {
current.incident_status = 'In Progress';
}
current.setWorkflow(false);
current.update();
current.setWorkflow(true);
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 01:32 AM
Hi @gy891815
You did not give a full context, but you can use the BR / client script and check the Date with the current date and set the state to in-progress. It is do able but need more details to guide.
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
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 01:42 AM
Hi all,
I have one field in table is wave go live date and other field is wave status. If go live date is past then wave status will be deployed otherwise it will show in progress
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 05:33 AM
Hi @gy891815
So you can create the Flow and in the flow add logic if Go live date is greater than the Current date or the date you have and then in the action update record > and set the state.
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
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************