You will need to look at using XPath to constrain the data to specific users.
It’s quite a big area, so I’d recommend you look at the Mendix Academy where they go into this in depth. Section 9 of the Crash Course is a good start, in particular 9.7.
https://academy.mendix.com/link/modules/325/lectures/2484/9.7-Using-XPath-for-more-Security