I want to create a Task View that only displays tasks associated to a specific User Role. I The attribute User Role Enumeration is located in the User Profile Entity (not the task entity) and I have an association between these 2 entities (Many to One between Tasks and User Profile respectively). For some reason the system is not recognizing this association when I am trying to execute the below. I have tried all of the following but none of them work. What is the best way to filter a Data Grid or List View by Enumeration Value “User Role” that is within Entity User Profile. I have 7 different user roles that I want to create a Task View for in my app. Data Grid by XPath – [MyFirstModule.Tasks_UserProfile_UserRole = 'hpm'] I get the error Data Source by Association there is nothing to allow me to select Database using constraints I can only select from Attributes in Entity “Tasks”
asked
Jaclyn Chadbourne
1 answers
3
For your XPATH to work you must have something like below:
Domain model
Here I associated Task to UserProfile
In UserProfile I have entered User_Role Enum: values are ‘Employee’ and ‘Approver’
I have also associated UserProfile to Account, because I want to associate the User’s logging in with the UserProfile
in this whole context User_Role enum is not required, but for your understanding I added it. You must actually work with Project security user roles, module roles etc.
Data grid to show tasks for users with User_Role ‘Employee’. So it will show all tasks for Employees. Once again, this must be done with security not with ENUM
If you are properly doing it with User roles, the XPATH will look like: [MyFirstModule.Task_UserProfile/MyFirstModule.UserProfile/MyFirstModule.UserProfile_Account/Administration.Account/System.UserRoles = '[%UserRole_Employee%]']