- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 05:46 PM - edited 12-22-2023 05:47 PM
I have a requirement as below
1. If user with a custom created role 'X' logins to ServiceNow instance and open incident list view, he must only see incidents of high priority that were created in the past 1 week only
2. All other users must see the default list view
How to apply "filters on list view dynamically" based on the role of logged in user.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 08:35 PM - edited 12-22-2023 08:35 PM
Hi @Snehal13
Such requirements are always far too short-sighted. There are always situations where user XY needs to see more than originally thought and then you are at an impasse.
Use the modules (second and third level navigation level) instead.
Create two modules, each with the same name but different role restrictions (tab "Visibility"). You can then configure the corresponding filter conditions in the "Link Type" tab.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 08:35 PM - edited 12-22-2023 08:35 PM
Hi @Snehal13
Such requirements are always far too short-sighted. There are always situations where user XY needs to see more than originally thought and then you are at an impasse.
Use the modules (second and third level navigation level) instead.
Create two modules, each with the same name but different role restrictions (tab "Visibility"). You can then configure the corresponding filter conditions in the "Link Type" tab.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 02:19 AM
Hi @Snehal13
You can do by changing the OOTB list module but it is not a good way. As @Maik Skoddow
- Create 2 different modules
- Set the visibility as per the roles.
or make change in OOTB with user. role in condition.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 04:15 AM - edited 12-23-2023 04:20 AM
Hello @Snehal13 ,
I can suggest you very simple solution on your concern mentioned.
*************************************************************************************************************
You can simply create QUERY BR and get the work done in 2 line of code.
Please check how i solve this problem.
1. Created a custom role - Test_role_RB
2. Created Before Query BR as below and used that role for condition.
3. Given that role to one ITIL user and impersonated him.
4. When redirected to Incident list view, I got the expected encoded query and result.
Note - As my PDI did not have those records, my list shown as empty but you can try this in your instance where incidents created in last week are present with priority as HIGH.
I have verified by applying other queries and it worked fine.
You will surely get the result based on this solution.
*************************************************************************************************************
Hope this find you easy answer of your query.
@Maik Skoddow @Dr Atul G- LNG - Please correct me here if you have other thoughts.
Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Happy to help you in future.
Thank you,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2023 04:58 AM
this is exactly the opposite of what I would recommend. Did you read what I wrote before?
"Such requirements are always far too short-sighted. There are always situations where user XY needs to see more than originally thought and then you are at an impasse."
Maik