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:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:31 AM
Hi Shaik,
Try this instead...
current.addEncodedQuery('u_fieldNOTLIKENetwork-Infra');
I'm assuming u_field is a string or reference field
http://wiki.servicenow.com/index.php?title=Operators_Available_for_Filters_and_Queries#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:35 AM
Chuck,
Its a string field,
Below are the fileds:
Network-ABA
Network-Operations
Network-Infra-Su
Network-Infra-Mu
Network-Infra-Ku
Network-Infra-Zoa
Network-Software
Network-Hardware
Network-Admin
Network-Infra-MM
I want to hide all the fields which contain Network-Infra except Network-Infra-MM.
Hope you understand what i am trying to say
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2017 06:31 AM
Is it a generic requirement or for a specific user?