- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2021 06:57 AM
I had a select box with options as yes or no or none[none is not a default one...its also a option]options..
when the user selected as "yes" then we need an alert popup with "Would you like to continue?" or "Not" options
If user selected No then we need to change the select box option to None else selected option i.e., Yes will be as it is..there will be no change
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2021 07:12 AM
Hi,
You can have onChange Client Script on that Select box variable
But you cannot have custom text on the confirm box. It would be OK and CANCEL
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
// use valid choice value here
if(newValue == 'yes'){
if(!confirm('Would you like to continue?')){
// user clicked on CANCEL
g_form.clearValue('variableName'); // give your variable name here
}
}
}
Regards
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-16-2021 07:23 AM
Hi
If I have multiple Yes or no variables. on the selection of yes for the two questions. I want to show an alert. how to achieve that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2021 07:47 AM
Hi Sai,
onchange client script
Regards
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-16-2021 07:50 AM
Hi Ankur,
can you please share a Snippet?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2021 08:29 AM
Hi Sai,
you will require multiple onchange client script on each variable
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader