Constrain a data grid to the current logged in user

Hi Everyone. I have my application being developed and in it, there is an Expense Overview page for displaying the expenses details.  The Expenses are added by Users and the expenses entity is associated with the User Accounts Entity. There is a reference selector in the add_expenses form with an Xpath constrain to show only the Current logged in user. Works fine, the different users add different expenses and the Accounts_Overview page shows all the expenses added with the usernames associated. But what I need to get is to only show the expenses added by the current logged in user in the expenses_overview page. What shall I do? How to use xpath to do this? It is a data grid that shows the expenses.  Please help
1 answers

I would expect the Accounts_Overview page to display a data grid of Account objects.  What you need is an Expenses_Overview page that contains a data grid of Expenses objects.  I'm assuming this is just a strange naming confusion...

To restrict the Expenses_Overview datagrid to only show expenses for the logged in user, you need to add an x-path constraint like

[YourModuleName.Expense_Account = '[%CurrentUser%]']

Or, you can add a similar constraint in the Entity access rules, which would be more secure.