Hide/Read-Only Slushbucket Filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2012 02:52 AM
HI,
The slushbucket that appears on clicking the "Edit" button in related list shows the filter that I have applied by personalizing the List Control.
My requirement is to Hide the filter or make it read only so that no one can change the filter.
How do I do it?
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2012 11:47 AM
You should be able to create a Global UI Script, but this is definitely a hack.
You would need to modify SNC Guru's code a bit as this was built for a Catalog Client Script:
http://www.servicenowguru.com/scripting/client-scripts-scripting/changing-filter-list-collector-variable-client-script/
This code seems to work for me, but it runs on EVERY page load and EVERY page with a slushbucket. That's why I say this is a hack job. You'll have to get creative to make it do what you want when you want:
try {
//Find the filter elements
var fil = gel('ep');
//Hide the filter elements
fil.rows[0].style.display = 'none';
fil.rows[1].style.display = 'none';
fil.nextSibling.rows[0].style.display = 'none'; //Filter description text
//Reset the filter query
g_filter.reset();
var answer = 'name!=NULL^sys_class_nameINSTANCEOFcmdb_ci_computer'; //Encoded query of choice goes here
g_filter.setQuery(answer);
acRequest(null);
} catch (e) { }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2015 02:43 AM
Hi Santosh,
Did you ever get the solution for this? I have a similar requirement.
Please post your solution here if you found any!
Thanks in advance.
Regards,
Prajakta Naik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2015 05:09 AM
Hi Tony,Tony Fugere (Cloud Sherpas)
Could you please explain the exact steps to be followed to implement the script that you have mentioned for hiding the related list filters?
Thanks.
Regards,
Prajakta Naik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2015 09:42 AM
Prajakta,
When I referenced "Global UI Script", that means putting that JavaScript into a UI Script where the GLOBAL checkbox is set to checked (true).
Read more on UI Scripts here: http://wiki.servicenow.com/index.php?title=UI_Scripts
Also, take heed on my warning about using this as a global UI Script.