Joining Two different Tables in Microflow - Mendix Forum

Joining Two different Tables in Microflow


Suppose we have two tables with attributes Project Code in each table. We cannot join these tables in Microflow to get a merged table. We have to use OQL. I think OQL is good and fast but its not always required as we might want to join for smaller tables. If we can have some activities that we can use in MF to do this.

Also using OQL is not low code way to some extend.


2 answers

In Mendix this is done by setting associations between entities, and using retrieve to get a list. From your description, your domain model would likely have an entity Project, having attribute Projectcode as a unique attribute and two other entities, holding the objects of the two tables that you want to merge. Neither of those two need to have attribute ProjectCode, since that is already in entity Project.

Next you can retrieve the object from Project and on a page add a datagrid/listview/galary and add columns that show ProjectCode, and the columns of the other two table over association. There you go.

If you still want/need to have all objects in one merged list, then create yet another entity having all attributes you need, do a retrieve form your first entity, then another retrieve from your second entity and use “List operation” to merge them.



Hi Rajeeb,

you have two tables create one more table to store the join object. retrieve both existing table using a microflow then put iterator inside put a iterator then pass one table list as parameter for 1st iterator and another for next iterator. now you can easily compare two tables. create a list before the iterator for joining table, then inside iterator check that the 1st iterator project code equal second iterator using decision if true then create a joining table and map attribute then add to created list. now in the list you get the result object.