Hey all, I've got what looks like a bug, but I want to make sure I'm not overlooking something. Here's a simplification of the scenario: A user can be part of a team. A file can belong to a team. Account x----x Team x----x Files Now I want to give a user a ReferenceSetSelector that allows him to pick one or more files. I have Mendix auto-generate the multi-select listview page for the selector. I pick the option 'xPath' as datasource, and add a constraint [A.Files_Team/A.Team/A.Team_Account = '[%CurrentUser%]'] As I want users to only be able to select files from their own team. However, the listView consistently returns a list of all files. In an attempt to check if my xPath was somehow incorrect, I chose 'microflow' as datasource and pasted the exact same xPath into the database retrieve action. This did yield the correctly constrained list. Unfortunately with microflow as datasource the listView does not allow for search, so it's not really a long-term solution. Has anyone else noticed this behavior? Am I overlooking something? Is this the normal (if slightly confusing) behavior of [%CurrentUser%] in pages vs microflows? Or is it simply a bug?
asked
Christiaan Westgeest
2 answers
3
Perhaps you configured the XPath constraint on the select page, instead of on the reference set selector. In that case you should also see this warning: "Property 'XPath constraint' on the list view of the select page has no effect when the page is used for selecting. Instead, the selection constraints properties of the add button can be used to constrain the selectable objects".
answered
Daniel Schilperoord
2
Phaw! I felt like I was overlooking something obvious.
There ya go. Thanks for the pointer mate!