select "ON HOLD" option in state field in the form then it turn into progress after certain period
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
Hello,
I Have been assigned to the task where I have field called state which is having choice like "ON HOLD" on the incident form. When I select the "ON HOLD" option it will ask me to update the "OFF HOLD Date/Time" which is another field on the form based on "ON HOLD" selection it should be visible to me. The "OFF HOLD Date/Time" should be mandatory field you should select a future date only. Now when the selected "OFF HOLD Date/Time" reached in the system like if suppose you selected the date as "18-08-2025 10:00:00" when the system reach same time the record should automatically change the state to "WORK IN PROGRESS"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
Hi @GOLLADASARS
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
7 hours ago
it's an easy requirement.
I am sharing steps for each of your items.
1) create UI policy to show and make mandatory "OFF HOLD Date/Time" when State changes to ON HOLD
2) create another onChange client script on "OFF HOLD Date/Time" to allow only future date and restrict past date
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
g_form.hideErrorBox('off_hold_date'); // give your field name here
if (newValue != oldValue) {
var RightNow = new Date().getTime();
var end = new Date(g_form.getValue('off_hold_date')).getTime(); // give your field name here
if (end < RightNow) {
g_form.clearValue('off_hold_date'); // give your field name here
g_form.showFieldMsg('off_hold_date', 'Off hold date must be after the today, 'error', true); // give your field name here
}
}
}
3) then have a flow on incident table
a) Trigger Condition: State Changes to On Hold AND OFF HOLD Date/Time [IS NOT EMPTY]
b) Use Wait for Duration and make flow wait till that date reached
c) Once date reaches flow will proceed and you can use "Update Record" flow action to update the State to Work In Progress
check this which talks about the same, it uses catalog item variable but you can pick the OFF HOLD Date/Time instead of variable
Flow Designer : Making the flow wait until a specific date time based on a catalog variable
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader