Need to hide choice list on the field which is under section
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:46 AM
function onload(){
var value=g_form.getValue('connect');
if(value=='6')//6 is the backend value of my connect choice
{
g_form.removeOption('result', '4');
}
else{
g_form.addOption('result', '4', 'confirmed');
}
but this code is not working can some one help on this ,
result filed is in form section as like below image
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 10:18 AM
Things to check
1) are you comparing the correct choice value for connect?
2) is the connect field on form? if not then you won't get the value of that field
3) as per screenshot the field is Resolution code whose column name is close_code. are you setting correct choice to correct field?
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