Report on Licensed users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2016 10:50 AM
Hello Everyone,
I'm trying to get a report for Licensed Users. By creating a report on sys_user table with below filter condition
sys id is javascript:gs.getRoledUsers();
The result gave me licensed users. But it includes the users who are having only role 'snc_internal'.
I want to exclude those users from the report. Please help on this.
Thanks
Madhuri
- Labels:
-
Performance Analytics

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 11:16 AM
Hello everyone,
I'm also having similar kind of requirement. please need help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2016 09:48 AM
Hope this will help you guys
1) create script include: snc_internal_users
2) set client callable = true.
3) set the filter condition in Report: Sys ID IS NOT javascript:snc_internal_users()
function snc_internal_users() {
var snc_role = false;
var rpt_roles = [];
var user = new GlideRecord("sys_user");
user.query();
while(user.next())
{
var user_role = new GlideRecord('sys_user_has_role');
user_role.addQuery('user', user.sys_id);
user_role.addQuery('role.name','snc_read_only'); //edit the role as per your requirement.
user_role.query();
while(user_role.next())
{
if(user_role.getRowCount() == 1)
{
rpt_roles.push(user.sys_id.toString());
}
}
}
return rpt_roles;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-05-2016 01:42 PM
If you got the Helsinki release I think you should look into the subscription management application:
Subscription Management application
//Göran