How to hide records from LIST view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:24 AM
Hello Everyone,
we have a requiurement where i need to hide few records completely for which i written below BR Query script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.addQuery("u_field",'NOT LIKE' ,'%Network-Infra%');
})(current, previous);
List of records what i have in Table:
Network-ABA
Network-Operations
Network-Infra-Su
Network-Infra-Mu
Network-Infra-Ku
Network-Infra-Zoa
Network-Software
Network-Hardware
Network-Admin
I want to hide the recrods which starts from Network-Infra:
Network-Infra-Su
Network-Infra-Mu
Network-Infra-Ku
Network-Infra-Zoa
----------------------------
With above query i able to hide the fields, now my requirement is i want to add 1 record which should be visible:
Below is the record: Network-Infra-MM (This record should be visible how can i achieve this)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:36 AM
Its a generic requirement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:31 AM
Hello Shaik,
What you can do is to set up a default filter on your list.
Reference:
How to apply a default filter on related List ?
How to change a default list filter?
Create a default filter for a related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:31 AM
Hi Irfan,
your onQuery business rule is hiding that record as well since it starts with "Network-Infra" so why not update your business rule to include an array of values you need to hide.
this solution is recommended if less values are to be hidden through business rule i.e. array has less elements.
Example: consider you want records to be hidden for 4 values of 'u_field' then you can create an array with 4 elements. if in future need arises you can just add an element in the array and that should work.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:36 AM
ANkur,
I thought the same since i have more than 50 records which i hided later today we got a request to new role with similar name which should be visible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2022 05:20 AM
Hi,
Using Global Hide Manager You can easily hide (Edit, List, Detail View) fields as well as there value in any record. you can also Encrypt fields from left to right/right to left i.e. ****25 8954