Please this documentation about filtering data. It also covers a scenario of customers and their orders
https://docs.mendix.com/howto/logic-business-rules/filtering-data-on-an-overview-page
Xpath constraints are commonly used to retrieve filtered data. For example orders of a particular customer/users only. For details about Xpath and examples please see this in docs
https://docs.mendix.com/refguide/xpath-constraints