How can we add the restirction in list view without using any server side script or ACL's
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hey Community,
I have a requirement where I want to restrict the list view according to the role. Let's consider there are 2 roles, role AB and role XY, so without using the ACLs and any other server-side script, I want this to be achieved.
Do let me know if there is any other way to do this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
hey @SohamTipnis
You can control the list view based on role without using ACLs or server-side scripts, but please note this will only control the UI behavior, not actual data security.
If the requirement is only to show filtered records in the list view based on role, you can use one of the below approaches:
Option 1: Separate Modules with Role and Filter
Create two separate modules for the same table.
Assign Role AB to one module and Role XY to the other.
In each module, define the required filter using an encoded query.
Example:
For Role AB - field = value1
For Role XY - field = value2
When users open the module, they will automatically see only the filtered records based on their role.
Option 2: Use Data Filters
You can configure a Data Filter on the table and associate it with User Criteria mapped to specific roles. This allows you to control what records are visible without writing scripts.
Note:
Without ACLs or server-side logic, this restriction can be bypassed if users access the table directly via URL or modify the filter. So this approach is suitable only when the requirement is UI-level restriction, not strict data security.
*************************************************************************************************************************************
If this response helps, please mark it as Accept as Solution and Helpful.
Doing so helps others in the community and encourages me to keep contributing.
Regards
Vaishali Singh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @SohamTipnis ,
I second with @vaishali231 explanation, user can bypass the customer filter to default.
User can reset to default view.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
what do you mean by restrict list view?
Are you saying Role AB user wants to See 1 List View and Role XY user wants to see other list view?
If yes then why not use View Rules on your table
You will require script to check role
Even if you create separate left nav modules, they can still switch the List View and they can see other fields
simply give your role in script and view name
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
@Ankur Bawiskar I meant to say list records, not the list view.
My requirement is to restrict record visibility in list view without using any ACL, query BR, or any server-side logic. Is it possible to achieve this?
