Using Xpath constraint to only show users own data to user: why can the user not see his own data?

0
I got an app in which users can add orders. I created an association between Order in the Management module and Account in the Administration module: Order_Account. I use access rules of the entity Order in an attempt to be able to show the user only the data he added himself. [Management.Order_Account='[%CurrentUser%]'] The problem is that when I run the app, the user can add data, but the added data is now not shown at all, the Order page stays empty. The order is added, cause the Administrator account is able to see the added data. So there must be a problem in the Xpath constraint I used. Does someone know how I can solve this?
asked
3 answers
1

Hi Marijke,

You need to  enable Store 'owner' on the Order entity, I hope this helps you.

 

Good luck.

 

 

answered
1

Jeffrey's change only works if you are using the xpath of [System.owner = '[%CurrentUser%]'], it sounds like you've created the associations that you need but you aren't setting them on the creation. Can you add the reference selector to show the associated account and then see if it is indeed set from the admin view? Typically if you're doing it the way you've described, the "new" button needs to be a microflow where you set the association first prior to showing the new/edit page.

answered
0

Hi Marijke, 

 

I know you have it working, but not really the way you would like it to work, so perhaps the following forum post can help you to establish the required association between Order and Account: https://forum.mendix.com/link/questions/9154

 

Kind regards,

Jeffrey

answered