Hi Tim Schaeffer,
you can do it in a simpler way.
There is a concept called Access Rules in Domain Model. This can be seen only when your security is setup to Production.
Follow below steps to configure user-based data views:
1. Turn the security to Production.
2. Go to the entity you want to restrict.
3. Double click on it and go to Access Rule tab and create a new access rule.
4. select the module role which you restrict and give respective permissions (read and write)
5. Then go to the XPath Constraint tab and click on Owner button (before that click the checkbox of store Owner System variable).
6. Automatically the constraint will added to the constraint tab.
This can be done when security turned to production.
If not in production, you can constraint the data with adding constraint by selecting datasource as XPath
If you have any more queries, please check out this.
Just answered this question:
https://community.mendix.com/link/space/community/questions/132861
Replace task by booking and you have set your data correctly.
Then you can set a XPath constraint on DATA level. thus in you security.
Add the constraint on the security rule for the customer
[Booking_Customer/Customer/Customer_Account = '[%CurrentUser%]']
* Please note: