- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 10:07 PM
Hi All,
We have requirement to make "active=true" to be a mandatory filter on all reports being created on the sys_user table. Our user table is very large and has a large data of inactive users. Hence, any query on sys_user table from report should query only active users (additional filters can be included as per reports requirement).
Solved! Go to Solution.
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 10:14 PM
Hi
Try writing a before query BR on it.
Something like this :-
var tm = '';
var as = new GlideRecord('sys_user');
as.addQuery('active','true');
as.query();
while(as.next())
{
tm += as.name +',';
gs.addInfoMessage('ACTIVE User List : " +tm);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 10:12 PM
Hello,
Are the users able to see/read inactive users if you remove this filter?
By default, any user except an admin cannot read inactive users. There is an OOB query business rule "user query" which already appends this query in all search requests to the user table. Even though you wont see it in the report, the query is added before the search is triggered on the user table. So I dont think it would help out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 10:21 PM
thank you for your response.
I verified, the ITIL users are able to view the inactive users from the report module. However, would like to prevent them from viewing the same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 10:22 PM
There is an OOB business rule on sys_user table named "user query". Please activate it on your instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2018 10:24 PM