Filtering Users By Role in a Combo-Box


I am building a process where the user needs to select their manager from a list of other users that have the manager role assigned to them, they are to select this from a combo box. I was wondering how this is possible.

I am having issues as the function GetUserManagerRole(user) cannot be executed in the database aggregate.


Hi Tom,

There's no action to do this directly.
You will need to reference the system entity User_Effective_Role and then have an aggregate to fetch the Users innerd joined with User_Effective_Role with a filter like

User_Effective_Role.RoleId = Roles.Application1User

where Roles.Application1User is actually pointing to the Role you have defined in your application, in your case it would be something like Roles.UserManager (I guess this is the one from the Users module)

I have a created an appllication called "userroles".. I have to set a combox to display the list of users who has the role as "Userroles_User". I have an aggregate to the combox. But im not sure about the filter to set. I have used a function " Checkrole(roleId, UserId) = Roles.Userroles_User." for the place of RoleId i dont know the exact value to be replaced. Please help to fix this.

The solution to your question is the one posted before. Have you tried it?
Yeah i tried.... Its working. Thanks for your reply...
How can i add reference the system entity User_Effective_Role. kindly explain it

Hi Mohammed,

You have information about that here.


Dear.. I am not able to see the User_Effective_Role in the reference list.. i am able to see only the User Entity
I can see the User_Effective_Role in the clone user espace...  But in my project i am not able to add the dependency of this entity.... When try to add the depency from user espace i am  able to see the User Entity only.... Kindly help me on this... I am stuck... 

My task is to show the users list based on the User roles 

The entity User_Effective_Role is a system entity. Select (System) in the Manage Dependencies window.

Its working dear.. thanks a lot...

Does it also works for non-persistent roles?

afaik, roles that are granted runtime are not added to that table?

J. wrote:

Does it also works for non-persistent roles?

afaik, roles that are granted runtime are not added to that table?


In my case i am using both the roles and user table in user espace... I created roles at runtime (<myserver>/users) and I am able to populate the user list based on the assigned roles.