Need to restrict few sites to select
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:45 AM - edited 10-12-2023 01:56 AM
We have a record producer named Access request where we have a variable named Find site which refer to u_cmdb_ci_site table. We need to restrict ABC MSSA responsibility that user not able to select site where responsibility is ABC MSSA.
This filter we only need to user whose company is ABC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 01:56 AM
you can use reference qualifier and restrict the data from that table
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:12 AM
javascript:gs.getUser().isMemberOf('Cellnex_Project_Management')?'subcategory=Site^u_status!=Nominal^u_status!=In Acquisition^u_status!=Disposed^u_responsibility=Arqiva PMA'';
I tried with this but still i am able to see ABC MSSA sites
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:22 AM
Hi @Kunal33
You're missing an else in your "Ternary operator". Let's try below adjustment.
gs.getUser().isMemberOf('Cellnex_Project_Management') ? 'subcategory=Site^u_status!=Nominal^u_status!=In Acquisition^u_status!=Disposed^u_responsibility=Arqiva PMA' : '';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2023 02:43 AM - edited 10-12-2023 02:59 AM
Tried with this but still i am able to select ABC MSSA SITE
I have created a script include and called that script include in the variable. i think thats work