Can I assign same user role for two different users?

0
In my application, I have a user role InsideSalesmanager. I assign it for two different users. Now, I want to retrieve the login user name. I am using the below condition. But, I am getting the first user name even though I am logined as second user. Can any one help me? [System.UserRoles/System.UserRole/System.UserRoles = '[%CurrentUser%]'  and Active]
asked
3 answers
0

Use the $currentUser variable, this always includes the data of the currently logged in user.

answered
0

The above statement retrieves a user with the same role as the current user and is also active. If there is no sorting this will give you a random object with these conditions. In a microflow you should just use the $CurrentUser/name if you want to have the account name of the user.

Regards,

Ronald

 

answered
0

Hey Venkat, What are you trying to accomplish and where in Mendix: page or microflow?

I guess you want to retrieve the users with the same userrole as the logged in user on a page. The XPath you have is correct, but the Mendix security, with level Production, is the one what is interfering. In the Mendix security the userrole must be able to manage it self to retrieve other accounts with the same userrole. If not, it only retrieves itself. 

I hope this helps, otherwise can you please give some more info.

answered