Pass an object with its assoiated objects to a page

0
Hi,  I have a microflow which retrieves an object (object 1) from the database. I added a follow-up action to also retrieve the associated object (object 2) from the database. Now I would like to pass both objects to my page. How can I do this? On the “Open page” action I can just add one object and when I add there object 1 I am missing object 2 on my page  
asked
2 answers
1

The solution of Joshua is still the way to go, since the widget must be placed inside the context. If you have created a custom widget with multiple datasources, you don't comply with the Mendix approach, which is as Joshua describes. OR you have to place the widget in the main dataview and pass the referenced objects using an expression something like this $currentObject/Entity1_Entity2/Entity2/Attribute

 

My gut feeling says me that you created your own custom widget, without the right knowledge of Mendix. I strongly recommend that you first take the Rapid developer learning path before you start building custom thing for Mendix

https://academy.mendix.com/link/path/31/Become-a-Rapid-Developer 

answered
0

Instead of retrieving the object 2 in the microflow, you can try to retrieve it from the page, if it’s a simple association you just have to create a dataview of object 1, and inside of it create another dataview of object 2 (linked by association).

If the logic to retrieve the object 2 is a bit more complex you can use inside the dataview of the object 1, another dataview with an xpath source or a microflow source.

answered