- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 01:05 AM
I am investigating using Data Filtration to limit what users can see. I want to limit visibility to specific incident categories and assignment groups. However, when I build them, the user has their own tickets filtered out. The following scenarios need to be met:
-User can see: tickets they created
-Users cannot see: tickets assigned to group A with category B
-Users can see: tickets assigned to group A with category B that they created.
I tried adding a condition caller | is not | javascript: gs.getUserID(), however it doesn't accept it (like it would in the table query builder).
TLDR: I want to build a data filtration rule that applies the data condition UNLESS the user created the ticket.
Does anyone have any suggestions? I cannot use ACLs and I have already tried using query business rules to achieve the same solution (however my query is too complex to work).
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 01:42 AM
@Marcus Roworth : Yes, this condition javascript: gs.getUserID() is not working in Data Filtration condition section. However this can be achieved by script.
Refer this blog for more information.
https://www.linkedin.com/pulse/service-now-data-filtration-plugin-how-use-caller-me-ivan-betev
Hope it helps.
Kindly mark helpful/accepted if it helps.
Regards,
Priyanka Salunke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 01:41 AM
What's the reason for not using ACL's? Data filtration is evaluated before ACL's, so if you limit the records there, it doesn't matter who updated it, but if you create an ACL for tickets assigned to group a, with category B to the users that should be able to see it (you can script that condition on the ACL) and also have an ACL for 'opened by me', you're done. It seems your only limit is 'can't use ACL's' but what's the reason for that?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2024 01:42 AM
@Marcus Roworth : Yes, this condition javascript: gs.getUserID() is not working in Data Filtration condition section. However this can be achieved by script.
Refer this blog for more information.
https://www.linkedin.com/pulse/service-now-data-filtration-plugin-how-use-caller-me-ivan-betev
Hope it helps.
Kindly mark helpful/accepted if it helps.
Regards,
Priyanka Salunke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2024 01:24 AM
Hello @Priyanka_786 ,
I am trying to exclude rules for the caller, but I’m unsure where exactly I need to write the above mentioned code. Could you please help me with this?
Regards,
Pavan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2024 06:42 AM
If you go to background scripts (/sys.scripts.modern.do) then you can run the code.
However, please note that there is PRB1811326 raised by ServiceNow due to issues with Data Filtration and they've explained that they're expecting to upgrade Data Filtration in 2025.