alternatives for DOM to hide additional table reference attributes under List collector Variable

AjayPavanG
Tera Contributor

Hi,

 

how to hide additional table reference attributes under list collector variable. As servicenow requested to eliminate DOM methods to use in Client scripts. Currently I have script that using document.getElementById() to hide this info. Without using DOM methods, how can I achieve my desired result ?

AjayPavanG_2-1752632187009.png

 

 

any alternatives for DOM to use in my client script ??

 

I have the following solutions but looking to see if there are any other solutions to hide these additional info without impacting any UI change or removing reference attributes ?

 

I can edit/remove the list elements under referencelist selection(sys_ui_list table) to hide/remove these attributes under list collector. 

AjayPavanG_0-1752631743827.png

 

Also, to change the list collector UI visibility, using glide_list helps not showing these additional info. 

AjayPavanG_1-1752631942875.png

 

4 REPLIES 4

Chaitanya ILCR
Kilo Patron

Hi @AjayPavanG ,

 

you have already mentioned the 2 approaches. (ref list and making the the list collector a glide_list)

 

I don't think there is any other way without DOM manipulation

 

with DOM you can try this

https://www.servicenow.com/community/incident-management-forum/how-to-hide-a-option-from-a-list-coll...

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

removing the list elements under referencelist selection(sys_ui_list table) impacts any other functionality elsewhere on the platform ?

Hi @AjayPavanG ,

yes, it will reflect in all the slush buckets ( you will see this when you click on EDIT button on related lists ) but since the table your doing it for looks like is won't be used much

so you can update the list 

 

else 

you can go with the glide_list 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Ankur Bawiskar
Tera Patron
Tera Patron

@AjayPavanG 

you can configure the view (sys_ref_list) and remove the fields from that view

Why to use DOM manipulation?

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