Filter Users with no role

I have a list of users in the user entity from which some have Manager role some don't. I want to aggregate the users who don't have manager role . Can someone help me with how to filter that using following entities?


Is the test value of role manager matches with your database ? Check the role id of manager in role entity and assign to test value refresh the data.

Hi ,

You can apply in aggregate like this 

Hi purva ,I tried this way but it is still not listing out those users without manager role. 

Hi ,

add User_Role entity in aggregate and then filter as User_Role.Role_Id<>Roles.Manager which is Harika said to you 

And join is Only with 
try this one

Hi @Shrushti Wamne 

Add filter User_Role.Role_Id <> Roles.Manager to get users other than managers.

Hi Harika,

It is still listing out the users with manager role. I have used the filter as you said . (User Profile is the extension to the user entity). Help me with join the please.

Thanks

Is the test value of role manager matches with your database ? Check the role id of manager in role entity and assign to test value refresh the data.

If you are using advance query then you can write below script to get the user list.


select * from  ossys_User with (nolock)  where TENANT_ID in ( select TENANT_ID from ossys_User_Role with (nolock)

where Role_Id in (select id from ossys_Role with (nolock) where NAME<>'Manager'))


Dileep

Champion

Hi

As other's reply, you can use aggerate like bellow. Also instead of use User_Role consider use User_Effective_Role,
Because User_Effective_Role also applies to Group.



Hi Tom Zhao 

I tried with your suggested filter as well but it is still listing out the users with manager role (User Profile is the extension to the user entity).  Can you help me with the joins please?

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.