How can I get the same data from two entities ?
Application Type

Hi ! I am really newbie in Outsystems. I found some difficult things to get the same data from two entitys. I have two entitys, the first one I named "Rincian_Stok" and another one is "History_Stok". I want to show data when the data from Rincian_Stok dan History_Stok is the same.

This is my History_Stok data :

And this is my Rincian_Stok data :

If I set the condition statically in Rincian_Stok, data will shown like below :

But if I set the condition, data will not shown

I don't know where my mistakes is. Can anybody help me ?

Hi Alfonsus,

I believe what you are trying to manipulate is the Join Condition between the two entities, which is what determines how the rows from one entity will match with the rows from the other entity.

Assuming you want to join them depending on an specific attribute that they share, you would have to set the join condition accordingly, e.g. Riancian_Stok.Cabang = History_Stok.Cabang. However, note that this wouldn't be added as a Filter but rather as the Join Condition between both entities, which should be changed and manipulated by adding the join in the Sources tab of your aggregate:

So your aggregate would probably end up looking something like this, adding additional field comparisons with the AND operator as necessary, also make sure to adjust the field names if they are different between the two tables:

Take into account, that joining tables by non-identifier columns (specially Text attributes) can be problematic at times because the values need to match exactly, so Rincian_Stok.Cabang needs to be exactly the same value as History_Stok.Cabang.

Let me know if this solves your problem.

Hi Fransisco ! Thank you for your answer. I have joined those entitys but I got result no records to show like below :

I have no idea about the mistake.


Can you show me an example of the two records that should be matching by this join condition and you were expecting to see in the results (and all of its attributes if possible)? I would just like to take a deeper look to see if there's anything we are missing here.

Other than that, the other potential problem I see is the names not matching exactly due to trailing spaces or something similar, you can try to use the following condition instead just to be thorough in that sense:

Trim(Rincian_Stok.Cabang) = Trim(History_Stok.Cabang)

From a close inspection at the sample screenshots you provided, it seems to me that the Text attributes from your examples might not be exactly equal, if you take a closer look you can see that the hyphen characters are not exactly the same; that is, one seems to be a hyphen ("-"), while the other seems to be an en dash ("–"), which would be easy to miss and might be the exact source of your problem.

If all the attributes in your columns follow that pattern, a join condition like this might solve the problem:

Replace(History_Stok.Cabang, "–", "-") = Replace(History_Stok.Cabang, "–", "-")

(Try to copy and paste the expression above instead of typing it directly, because both hyphens look fairly indistinguishable in this case).

However, assuming this works, it should only be used as a temporary workaround, and you should probably apply some normalization to your Entities to ensure that both of them are using the same format for all future joining purposes.

Hello Alfonsus,

Please read this documentation for better understanding bout entity joins.

And, if possible please share your OML to help you to get the required functionality.

Thanks & Kind Regards,


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.