- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2025 11:41 PM
On change written on request_type field . Yes, the value of the choice is 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2025 11:45 PM
share screenshot of that variable config.
did you try adding alert and see what came in newValue?
try this
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
alert(newValue);
if (newValue == '1') {
g_form.showFieldMsg('request_type', "This request requires email approval from the Business mgmt", 'info');
} else {
g_form.hideFieldMsg('request_type', 'true');
}
//Type appropriate comment here, and begin script below
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2025 11:57 PM
Tried this but couldn't get the result .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2025 12:02 AM
alert didn't come?
if yes then your client script config is wrong.
client script is marked as Applies on Catalog item view right?
if not then it won't run
share client script config screenshot
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2025 11:38 PM
Hi @1_DipikaD
Try few things:
1. Try using == 1 instead of === '1' and check for an alert.
2. Check the correct value of the dropdown choice list.
3. check if "request_type" field is visible on the form, try using alert first and then show field message.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Thanks,
Brahmjeet