how to show records only related to current user in a data grid?

1
Hi  i have several records in my data grid , but i want to show only specific record base on different log in user's full name. for example user A has Full name of 'S123456789H' , then user A login he can only see the record which 'IC' field is 'S123456789H' , then after login , the data grid table i had read some related topic says this may be achieved by using XPath or Microflow , but for now no workable solution for me.. Much thanks
asked
3 answers
3

You also could restrict the visibility for special user roles. So that some usere see all data and some users only see restricted data.

For information about that, check the related course in the academy:

https://gettingstarted.mendixcloud.com/link/module/36/lecture/196

answered
2

Is the object that you are showing in the grid related to the account? If yes, you could use xpath to current user. If not, you need to show the current account in a dataview and use your grid nested in that view (as explained above).

answered
0

Hi Xue,

Are you associating the object to the accounts table? If so, you can use the current object token in your xpath constraint. You would need to have a dataview of the current user account on the page and the datagrid inside of it.

 

 

Then you can add this constraint

 

If you need help getting the current users account object, you can use this microflow as the data source in the dataview

 

Hope this helps!

answered