hello, I am using User Management module to create users and assign roles, primary table is “Account” (generalized from System.user), defined roles are “Employee” and “Manager”. I want to be able to assign Manager when I am creating a new user/account, The manager itself should have an account first with a Role as “Manager”. Create new account/user page looks like below, I want to add another dropdown/Reference Set for the list of all “Manager” user just underneath the “User Role” reference set. Could you please advise what is the best way to achieve it? Mendix Version: 8.18.1 or 2 or 3 Regards Johnson.
asked
Johnson Dsouza
2 answers
2
This can be done by
adding a 1-* self reference to the account entity
Rename the association to Account_AccountManager, to have a distinctive association
Add reference selector to the page Account_New (_Edit if needed)
Set data source attribute (path) Administration.Account_AccountManager/Administration.Account/Administration.Account.FullName
Set selectable objects Source; XPath with XPath constraint; [System.UserRoles = '[%UserRole_Manager%]']
If you want to limit the list to managers
answered
Rene van Hofwegen
0
User roles should not be a dropdown but a reference set. Because you can add multiple roles to the account.