I am struggling to figure out the XPath constraints for the data grid. I have a dashboard on home page with data-grid and source as XPath to entity “Package”. In this entity I have attributes called “OwnerName” and “AssignedToName”. OwnerName is the FullName of the user who is logged in while creating the package, this is set via a microflow when package is saved. AssignedToName is set when the Owner assigns the package to another user via combination of microflow and datagrid from another page. Now when a user logs into the application, the dashboard should only show the packages that belong to the current user or assigned to the current user. I have tried many many XPath variations to ensure that OwnerName matches %CurrentUser% but none of them worked. Can someone help? P.S. Let me know if the issue is not clear enough.
Instead of storing the name of the owner/assigned user store an association to this user, e.g. Module.Package_User_Owner and Module.Package_User_Assigned. Then your XPath becomes easy
//Module.Package[Module.Package_User_Owner = '[%CurrentUser%]' or Module.Package_User_Assigned = '[%CurrentUser%]']
If you NEED to do it by name instead of association (I would highly recommend an association), you need to do your retrieve on a datasource microflow. In the microflow, you can compare with attributes of your current user, on a page you can only compare to the object itself.
Can’t you use the system members in the entity? (store owner)