Populate Data Grid Using XPath with Constraints Based On User

0
Objective: I am building an application for a higher education institution for managing the following semester schedule/setup. When a degree/program chair logs in, the program they are associated with will be assigned. When that user then looks at a data grid, the data grid should only retrieve courses that are part of the program/degree they are associated with. Example: Computer Science program chair logs in, only Computer Science courses are shown for them.  How would I go about accomplishing this task? I was thinking that I would be able to use XPath and add a constraint with something like [Subject = [%CurrentUser%]/Administration.Account_Program/Subject]. Obviously that is not written correctly but I was thinking I could do something like that however, I have not been able to do something like this. Something like this would be ideal so that way the degree/program chair only has access to view/edit courses in their own program since no other courses are are returned. I was thinking as an alternative, I could just have it pre-filter results (as a hidden field) but having a default value as a search field requires it to be a value rather than a variable. Is this the right way to think about this problem? If not, what would be a better way?  
asked
1 answers
1

You are on the right path only you can not follow associations starting from the current user but can follow association to them (same for current object)

e.g.

[Courses.Subject_Program/Courses.Program/Administration.Account_Program= ‘[%CurrentUser%]’]
Hope this helps

answered