I need to implement the below use case through data filtration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:59 PM
Hi Everyone,
My use case is like..
1) In incident table, there are many records with different assignment groups..
Suppose I am creating a data filtration, that if user is part of Hardware group then only the user can able to see the records whose assignment group is Hardware.
User (with group hardware)----All assignment group incidents+ Hardware assignment group incidents
User(without group hardware)----All assignment group incidents except hardware assignment group incidents
This use case is working perfectly.
Now, I want to add one more condition
2) In the incident record, I have created a custom field--collaborator (list type).
Now if, in the collaborator field i have added a user (whose role is sn_collaborate, it is a custom role)
So, the use case is like..
If the user which is mentioned in Collaborator field is having the role--"sn_collaborator" then irrespective of user is a part of hardware group, the user can able to see the records in which assignment group is "Hardware" and collaborator is Me.
Here, I have created the 2nd data filtration.
But this 2nd data filtration is not working, maybe because in the 1st data filtration, we are hiding the records(whose assignment group is Hardware) , from the non-Hardware group members.
How can I tackle this use case..
Please let me know, if there is any doubt on the use case..
Thanks in Advance!!
Utsav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 02:09 PM
Hi, unfortunately I can't see any clear detail in your screenshots, but for the scenario you described I would normally use a Query Business Rule to build and apply an Encoded Query to filter the tasks that the user(s) can see.
Before Query business rules (servicenow.com)
This article from SN_Nerd is also a good primer
Query Business Rules: A Definitive Guide - ServiceNow Community
So that rather than trying to apply multiple different static queries, the QBR applies a dynamic (scripted) reference qualifier type query based on the logged in users relationship to the records involved.
Reference qualifiers (servicenow.com)
I would normally add my code to a script-include function and then call it from the QBR, returning a filter\query string to the QBR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 02:38 PM
Hi @Tony Chatfield1 really thankyou for your quick response..
Just one last query, can we implement the above scenario through Data Filtration.
Thanks in Advance
Utsav