- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2020 07:27 AM
Hi All,
i am creating a catalog item in that I have a select box as Impact with choices as Level 1, Level 2, and Level 3
if level 1 is selected i need a text to be displayed similarly for level 2 and level 3 but the texts are different.
how do I do that? kindly help me
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2020 11:31 PM
Hi,
you should be using the variable name which is impact and values as L-1 etc
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
g_form.hideFieldMsg('impact');
if(newValue == 'L-1'){
g_form.showFieldMsg('impact', 'TESTING Message 1' ,'error', true);
if(newValue == 'L-2'){
g_form.showFieldMsg('impact','TESTING Message 2','error', true);
}
if(newValue == 'L-3'){
g_form.showFieldMsg('impact','TESTING Message 3','error', true);
}
}
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
11-22-2020 11:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2020 11:31 PM
Hi,
you should be using the variable name which is impact and values as L-1 etc
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading) {
return;
}
g_form.hideFieldMsg('impact');
if(newValue == 'L-1'){
g_form.showFieldMsg('impact', 'TESTING Message 1' ,'error', true);
if(newValue == 'L-2'){
g_form.showFieldMsg('impact','TESTING Message 2','error', true);
}
if(newValue == 'L-3'){
g_form.showFieldMsg('impact','TESTING Message 3','error', true);
}
}
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
11-22-2020 11:55 PM
Thankyou its Working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2020 12:04 AM
You are welcome.
Please mark appropriate response as helpful.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader