Remove/Hide a field from the left slush bucket

Aparna Sharma
ServiceNow Employee
ServiceNow Employee

Hi,

I have a custom table that extends Task table and have created two new fields 'Category' and 'Subcategory' as reference fields in my custom table.

While personalizing the form/list, I don't want the Task table fields with the same name (Category and subcategory) to be available in the left slush bucket for the selection since these fields are not being used. Is there a way to hide/remove   these fields from the slush bucket so that user can't select these unused fields at all ?

 

 

Thanks,

Reach

1 ACCEPTED SOLUTION

You could still use ACLs for this, i.e. have an ACL for the field on Task table to deny access (at Task table level) and have separate ACLs for the same field for tables that extend Task (e.g. Incident, Change, etc.) to allow access on that level. ACLs on child table override ALCs on the base table. More information is available here:


Using Access Control Rules - ServiceNow Wiki


View solution in original post

17 REPLIES 17

Hi Anubhav,


I created 'add_to_list' ACL on the specific field and restricted it to admin role since i didn't want this field to be available to anyone but admin.


To your requirement, you should be able to set ACL Role to control who can/cannot see in the slush bucket. You can also go for the ACL script to specify more complex conditions.



Let me know if this helps.


Hi aparna,



For 'add_to_list' ACL, Roles and Scripts both seems to be not editable. I even tried using List edit but List edit is also disabled.


Another option is to use a script like this:



var opt = $$("select#slush_left option[value=category]");


gel('slush_left').remove(opt[0].index);


Hi Slava,



I have a requirement some what like this.


The script you have specified, where it needs to be written?



Thanks,


Sitarani


You would either need to customize the client script in 'list_mechanic' UI Page (which I strongly recommend against, lest you should get into trouble after an upgrade) or create a global UI script (which is not a very elegant solution either). In any case, remember to wrap your code into a try-catch block. And should you choose to go for a UI script, make sure you parse the URL and use an 'if' block to prevent the code from being executed on other pages across the system. Before you make any customizations to your instance, would you mind sharing the exact requirement you are dealing with? There might be a better way of achieving the desired result.