How to clear options and add options in a list field

seattmolsnod
Tera Contributor
We have choice field which field type is LIST (as we don't want to use a customer table but need to multiple choice). Is there way to clear the choice options and add new option in client script?
2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @seattmolsnod 

 

Are you able to see any active or visible option in choice by which without deleting you can hide or remove .

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@seattmolsnod 

you cannot use g_form.addOption() and g_form.removeOption() with this type of field

So your requirement cannot be done.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader