Get attributes from different entities

1
Hi,   I created a page where a user can create a report. For this report the user needs to select 3 attributes from entity A and 2 from entity B.  However I am not quit sure how to do this. Is this the right time to build a microflow to get those wanted attributes? And if so what exactly do I need to put in that microflow?
asked
3 answers
1

Hi Andreas,

 

If the option of using a reference on the page is not possible there are 2 additional options.
For both I would suggest to use a non-persistant entity to not have data stored double.

 

OQL
There is a module in the marketplace that allows you to use OQL.
Here you can write your own queries and have the result returned in the non-persistant entity.
https://marketplace.mendix.com/link/component/66876

 

Loop
In case of a loop you would need to retrieve both lists (for instance you want to combine Report and Plant)
Then you will retrieve all Reports and Plants linked to the Region.
You then loop through either the Plants or Reports and find the connected one in the loop to be able to combine both in the non-persistant entity and add that to a list of the non-persistant entity 

 

If it is a lot of data I would go for the OQL option for performance reasons.
Else you could use the Loop option since it doesn’t require the developer to have knowledge of OQL/SQL.

answered
0

Hi Andreas,

 

Do you have more information about your current Domain Model? It seems to me that you can achieve this with the use of an associaton. This is part of the Rapid developer course I linked below. You might want to complete the whole course if you are new to Mendix.

 

https://academy.mendix.com/link/modules/82/lectures/635/4.7-Associations-in-the-Domain-Model

 

answered
0

I do have a picture of the current domain model

answered