Remove Option From 'glide_list' field with Script

LdR
Tera Expert

Hi,

i want to remove a specific Option from a 'glide_list' field:

find_real_file.png


Is it possible to do this automatically (for example, after state change) by means of a script?

 

Thank's to all ☺

6 REPLIES 6

sachin_namjoshi
Kilo Patron
Kilo Patron

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();

 

}

 

Hi,

i want to remove an option from a glide_list field... Not a table... 

Can you help me?

Thanks ☺

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

LAXMI TODAKAR2
Tera Contributor

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