System.User list issue

1
Hi All, Recently, I’m tring to get specific user in microflow. However, I always get Administration.Account only, I’m very sure that I create other user in demo users. I want to know why I can’t get user account in system.user? Please correct me :’( Also, I try to use Range as First and XPath constraint [Name = 'demo_administrator'], the debug log shows Empty, can someone guiding me :’(
asked
2 answers
0

Hi AC,

 

It's best practice to create your own entity and have a generalization or a associaton with administration.account. Reason for this is because you cannot edit the system.user. Also in your Xpath you filter on the name attribute and this should be the userrole. This is a Association from the system.user entity. Below a sceenshot of a microflow that has this filter via an Xpath. In the Learningpath Advanced Page Building this is explained so that might be a good place to start if you want more in depth explanation about this.

 

https://academy.mendix.com/link/paths/56/Create-an-App-with-Advanced-Page-Building

 

answered
0

In addition to your screenshot, I would recommend retrieving on the userrole table. That way you can use the system variable ‘[%UserRole_<NameOfTheRole>%]’, instead of a string. This value will update in case someone updates the user role name, making it more robust than a string comparison retrieve.

 

answered