How to get a list view of roles which are not assigned to anyone?

Miikka_M
Tera Guru

Hi, 

Such a simple thing, but hard to find for somehow. I'm trying to find list view of all the roles which are not assigned to any user. I'm looking from here sys_user_role_list.do, but seems like there's no way to filter out roles which contains users. 

Can't be too hard - I assume some other people also wants to know how many roles are in instance without users. 

 

Special question: How to make a single score widget of this data to dashboard?

1 ACCEPTED SOLUTION

Ahmmed Ali
Giga Sage
Giga Sage

Hi @Miikka_M 

 

You can create report on the role table (sys_user_role) for this data. you need to put condition on related list as shown in below screenshots:

 

AhmmedAli_0-1685532484043.png

 

You can set related list as users above and make sure the condition is set as equal to 0 in related list section (heighted above. you can just click on condition there to update it)

 

Note: if role table is not available in table list in report creation view, add the role table name in system property: glide.ui.permitted_tables

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

4 REPLIES 4

Ahmmed Ali
Giga Sage
Giga Sage

Hi @Miikka_M 

 

You can create report on the role table (sys_user_role) for this data. you need to put condition on related list as shown in below screenshots:

 

AhmmedAli_0-1685532484043.png

 

You can set related list as users above and make sure the condition is set as equal to 0 in related list section (heighted above. you can just click on condition there to update it)

 

Note: if role table is not available in table list in report creation view, add the role table name in system property: glide.ui.permitted_tables

 

Thank you,

Ali

 

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

and you can simply change the report type to single score and add it in your dashboard.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Thanks! I'm getting there. Still wondering what filters should I put to related list conditions. 

2023-05-31 15_04_49-Window.png

 I tried this but didn't get any matches, even there is something like ~300 roles without users in instance. 

Any Ideas what conditions should I try to filter all the roles which don't have any users related?

Seems like I needed to change "Less than or equal to 0" to quantity and for conditions "user is not empty", that way I see number of roles which does not contain any users. Thanks for help!