Constraining DataGrid by UserRole

I have an Overview page with a DataGrid. I need this page to only show records that relate to the UserRole of the CurrentUser. I am currently achieving this by placing the DataGrid in a DataView that uses a microflow to retrieve the UserRole of the CurrentUser and then using the association on the DataGrid. This means that I cannot apply any further sorting, searching or constraining on other fields on the DataGrid. The best way for me to resolve this would be to apply the constraint to the Entity Access, but the XPath there will not allow me to filter on UserRole. Can anyone provide me with any options? Many thanks.
1 answers

If the objects that you are trying to filter are conencted to the userrole entity this should be possible.

The xpath can the run from your object to userrole and then to user and you couold then do a compare to the current user.