Adding two data sources to list


Hi

How to add two data sources to be in one table to show in one list?

This's what I did so far, but I think I have a problem with condition




Hi Faris,

Normally the join condition between to tables is done by table1.attribute1 = table2.attribute

You have used the greater than (>).

If you want to filter on a particular DepartreuCheckinArea.Id than add that condition to the filter tab.

Regards,

Daniel


As you can see in the print screen, at left you already have 2 entities as source. You just need to use this aggregate as a source in a list widget.

Do you wanna explain better what you pretend to do? :)

Daniël Kuhlmann wrote:

Hi Faris,

Normally the join condition between to tables is done by table1.attribute1 = table2.attribute

You have used the greater than (>).

If you want to filter on a particular DepartreuCheckinArea.Id than add that condition to the filter tab.

Regards,

Daniel


I don't want to filter, I would like for DepartreuCheckinArea and ArrivalCheckinArea to be shown in the same list each on seperate items, this's the page I want it to be shown in:

Its already showing the list for DepartreuCheckinArea



Tiago Mota wrote:

As you can see in the print screen, at left you already have 2 entities as source. You just need to use this aggregate as a source in a list widget.

Do you wanna explain better what you pretend to do? :)

How to I use this as a source in a list widget? I already have a list widget which is showing one source


Faris Abdullah Almozini wrote:

Tiago Mota wrote:

As you can see in the print screen, at left you already have 2 entities as source. You just need to use this aggregate as a source in a list widget.

Do you wanna explain better what you pretend to do? :)

How to I use this as a source in a list widget? I already have a list widget which is showing one source


You are using as a source to your list an aggregate, and inside this aggregate, you have your Entities(1/2/5/10 entities with the proper join that you selected before) , check the pic that is your aggregate that is the source of your list


Carlos Lessa wrote:

Faris Abdullah Almozini wrote:

Tiago Mota wrote:

As you can see in the print screen, at left you already have 2 entities as source. You just need to use this aggregate as a source in a list widget.

Do you wanna explain better what you pretend to do? :)

How to I use this as a source in a list widget? I already have a list widget which is showing one source


You are using as a source to your list an aggregate, and inside this aggregate, you have your Entities(1/2/5/10 entities with the proper join that you selected before) , check the pic that is your aggregate that is the source of your list


Ok got it, but how to I use those entities to be shown in a single list widget?


Hi Faris, 

Can you share a print and point what is exact where you have the problem?

It will help us to understand your problem.

Thanks

Hi Fariz,

you asked the same question before.

Did you try to understand what was answered there by Daryna ?  She offered a low code solution, wich could also be attained by using a Union in an SQL widget, but I honestly think that would be too advanced for you at the moment.

To explain to others in this post thread : he doesn't need a join but a union.  He apparently often has similar tables in his datamodel that he wants to display in a single list.


Fariz, I think you should really reconsider your datamodel, it looks like you fail to properly isolate separate concepts into the right entities.  We can't see your actual datamodel, but if you have entities that have a large overlap in same attributes and only are different on a few points, maybe you should not have another entity in your model for each, but have one entity, with some kind of type attribute distinguishing them.  

For example, going by the name you have one entity DepartureCheckinArea and one entity ArrivalCheckinArea, that might  very well be possible to model as one entity called CheckinArea, with one attribute identifying whether it's for departure or arrival.

Similar for ArrFlightDom and ArrFlightInt, sounds like maybe one entity ArrFlight with an attribute identifying wether it's domestic or international.

Your repeated attempts to show these different entities in the same list are to me a strong indicator that you should look at your datamodel more closely.

Hope this helps,

Dorine

Luís Cardoso wrote:

Hi Faris, 

Can you share a print and point what is exact where you have the problem?

It will help us to understand your problem.

Thanks

Yes of course, I attached  the OML


Dorine Boudry wrote:

Hi Fariz,

you asked the same question before.

Did you try to understand what was answered there by Daryna ?  She offered a low code solution, wich could also be attained by using a Union in an SQL widget, but I honestly think that would be too advanced for you at the moment.

To explain to others in this post thread : he doesn't need a join but a union.  He apparently often has similar tables in his datamodel that he wants to display in a single list.


Fariz, I think you should really reconsider your datamodel, it looks like you fail to properly isolate separate concepts into the right entities.  We can't see your actual datamodel, but if you have entities that have a large overlap in same attributes and only are different on a few points, maybe you should not have another entity in your model for each, but have one entity, with some kind of type attribute distinguishing them.  

For example, going by the name you have one entity DepartureCheckinArea and one entity ArrivalCheckinArea, that might  very well be possible to model as one entity called CheckinArea, with one attribute identifying whether it's for departure or arrival.

Similar for ArrFlightDom and ArrFlightInt, sounds like maybe one entity ArrFlight with an attribute identifying wether it's domestic or international.

Your repeated attempts to show these different entities in the same list are to me a strong indicator that you should look at your datamodel more closely.

Hope this helps,

Dorine

Yes I tried but I don't want to make an SQL widget because I already have everything setup. Also about your suggestion, I need to have all entites seperate becuase I have more than two and each have its own report forms, compining them together will cause me a headach on how to seprate each from each. I found one solution for the past question which showing sperate lists in sperate screens to go back and forward with one button, but it wasn't ideal. If I can just compine entities into one list widget it would better.

Faris Abdullah Almozini wrote:


Yes I tried but I don't want to make an SQL widget because I already have everything setup. Also about your suggestion, I need to have all entites seperate becuase I have more than two and each have its own report forms, compining them together will cause me a headach on how to seprate each from each. I found one solution for the past question which showing sperate lists in sperate screens to go back and forward with one button, but it wasn't ideal. If I can just compine entities into one list widget it would better.

In the past question, Daryna showed what you need.  She added an oml as example.  It would involve having 2 separate aggregates, one for each table.  And then you will need some logic to add both into a single list, maybe also add some sorting of this list, and than this list can serve as a source for your list widget on the screen.  Maybe put both in a single data action, that will be easier to build.


I had a look at your oml, and that made me really sad, but as you said, you've taken it this far already, so you want to finish it this way... I can't argue with that.


Wish you the best of luck with it

Hi Faris, I would advise you to use the weekend and free time to improve your knowledge in OutSystems,

Here is the link for the FREE Bootcamp course for Mobile Developers, there you will learn most of the answers for your questions here in the forum

https://www.outsystems.com/learn/courses/115/developing-mobile-apps-outsystems-11/

Best Regards and good code