Retrieving single object

Hello everyone, I hope you're all doing well. As a newcomer to Mendix, I'm currently working on setting up a details page that allows users to view the attributes of a specific object. My intention is to have a list widget display only minimal contents, and if the user desires to see expanded details, they can choose to do so. The main challenge I'm facing is retrieving all the attributes and their corresponding values associated with the object that the user clicks on. I want to avoid fetching all objects associated with that entity, and instead, focus on getting just the selected object. The desired end-user flow is as follows: The user clicks on an object from the list view. The page opens up, displaying more comprehensive contents of the selected object. I would greatly appreciate any guidance or advice on how to achieve this functionality effectively in Mendix. Thank you all for your help and support!
1 answers

Hi Michael Scanlon,


Minimal content can be interpreted as:

  1. Only the required attributes from all records
  2. Only the required records
  3. And a combination of only the required attributes from the required records


For 1. you can use an Enity that contains that minimal set of Attributes with a 1:1 association to an Entity with the remaining Attributes. If the list view does not fetch data over the association, you can have your application retrieve the minimal data volume and query the data from the associated Entity on a need-to-have basis.


For 2. you can use XPath as a Data source


You can combine the both.


Go Make It