Unable to XPath constraint user in same organization with specific roles

0
My domain model is like this: “ApplicationUser” and “UserOrganization” entities. ApplicationUser contains all of the users who would login and is generation of Administration.Account. UserOganization contains Name, Code, and Address of the Organization (office in simple terms) each user belongs to. I have connected user profiles to a role and organization. Now I want to show all of the ApplicationUser belonging to the $currentUser’s organization with their role information and I am failing to do this. This page contains listview nested under dataview. I have also associated ApplicationUser to System.UserRole and able to connect the System.UserRole/Name in a text field inside the listview but when I run the app, the role doesn’t appear. See below.    Rob Stark = ApplicationUser/FullName STARK= UserOrganization/Code Blank space under Code is connected to System.UserRole/Name but it doesn’t appear on screen.      Also, as you can see the Lannister are there as well. I only want to show users who belong to same office/organization as the user who is logged in. For example, If Ned Stark logs in, he should only be able to see and select rest of the STARKS and no one else.
asked
1 answers
1

Your listview needs to be nested in a dataview showing the current user. Then you can use the following xpath:

[MyFirstModule.ApplicationUser_ UserOrganization/MyFirstModule.UserOrganization/MyFirstModule.ApplicationUser_ UserOrganization = '[%CurrentObject%]']

answered