Remove Option From 'glide_list' field with Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2018 08:32 AM
Hi,
i want to remove a specific Option from a 'glide_list' field:
Is it possible to do this automatically (for example, after state change) by means of a script?
Thank's to all ☺
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2018 09:36 AM
Yes, this is possible using business rule.
You can configure business rule when state changes and remove option from glide list backend table.
Your list is pointing to reference table.
You can use below code in your business rule to remove any value from backend table.
var rem = new GlideRecord('incident'); // update table name as per your glide list table
rem.addQuery();// update query as per your requirement
rem.query();
while(rem.next()){
rem.deleteRecord();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2018 10:41 AM
Hi,
i want to remove an option from a glide_list field... Not a table...
Can you help me?
Thanks ☺

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2018 01:49 PM
Yes, it's possible to clear option from glide_list.
Please find below solution
https://community.servicenow.com/community?id=community_question&sys_id=69c013a9dbdcdbc01dcaf3231f9619f2
Regards,
sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2024 07:17 PM
Hello,
I got the same requirement, I have referred below post for removing values from glide_list type field.
https://www.servicenow.com/community/in-other-news/managing-glide-lists/ba-p/2279191
Thanks,
Laxmi