- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2023 10:50 PM
Hi,
Need your help to remove(hide) the values starts with SNOW from the category drop down list into SP. The below script is working correctly but i should remove dynamically instead of calling removeoption for each category. If a new value(starts with SNOW) category is added in future, this code should remove it automatically from the particular record producer.
function onLoad() {
//Type appropriate comment here, and begin script below
g_form.removeOption('category', 'SNOW-Modules');
g_form.removeOption('category', 'SNOW-Compensation');
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2023 01:42 AM
Instead of going with catalog client, can you try using reference qualifier to not show options starting with SNOW.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2023 11:42 PM
Hello @BanuMahalakshmi
Modify this line :-
if(newValue.indexOf("SNOW")>-1){
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2023 01:42 AM
Instead of going with catalog client, can you try using reference qualifier to not show options starting with SNOW.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2023 04:48 PM
Now that is starting to make sense. What type is the category variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2023 09:05 AM
Hi @BanuMahalakshmi ,
I think category is a string field we don't have option to add reference qualifier to it.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar