unable to read all records due to a Query BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 04:41 AM
Greetings,
As part of our requirement, we have a table (Table A) with 4 personas (i.e., admin, planner, viewer, manager).
1. Admin - the user should be able to view all the records in the table, even if the the user is an planner, viewer or manager.
2. planner/ viewer/ manager - the user should see the filtered list of records as per their involvement (i.e.., the user should be either planner, viewer, or manager).
We have written a query BR where we were sending a query as per user role to fetch the filtered list on Table A list view. (working)
We also have a catalog field with values from another table (Table B) and we need to exclude values/records that has been already submitted in the previous mentioned table (Table A).
We are supposed to fetch all record names (using Script Include) but when we are trying, we are unable to fetch all the data. The data we are receiving is also filtered due to the Query BR and the Script include is unable to access the other part of the data which was previously filtered.
Please help us to fulfill this requirement in such a way that we get filtered list as per user, also we should be able to fetch all the record names with no reference to the role of the user.
Thanks in advance,
Sakshi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2024 05:34 AM
2 things to do
1) Do this in your query BR on table A.
Add condition of interactive session check
2) when you query Table A via Script include ensure you use setWorkflow(false) while performing GlideRecord so that it excludes the Query BR
something like this
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader