Reference selector with XPath and database source only returns first object

Hello I am trying to use a reference selector as drop-down and when selecting on the database and an XPath, a single object is returned. When I use a microflow as source instead, with the same XPath, a list of objects is returned. Am I doing something wrong? I would have expected that both sources would return the same selectable objects. For example: XPath [System.UserRoles = '[%UserRole_Admin%]'] on database gives only one object, but in a microflow, the same XPath on a retrieve gives multiple objects as expected. Why would this not work when I use database as the source? I am quite sure that this has nothing to do with security, as when I logged in with a different account, I could only see the first user and not my own.
3 answers

Sounds like a security issue. Especially since you mention that a microflow retrieve gives a different result from simply using the XPath constraint on your dropdown reference selector.

The times that I encountered these scenario's, it all came down to the User Management setting for the User Role as specified under Project Security. See also documentation.

In short: the user management part of your security also determines what shows up in reference selectors. If you grant UserRole X no UserRoles that it can 'manage', they will also not appear in a reference selector dropdown.


I just tried this and it seems to be working for me. I made a test project that you can download here. See the added reference selector on the Account_Edit page.

My initial feeling while reading your post was security, so I'd recommend turning it down to Prototype mode and giving that a shot. If that doesn't work, review my test project and see if you have any differences.


Thank you very much - your example indeed works and I will check my project again.