How to display a list within a list?

How to display a list within a list?

  

I am aware that you must make use of a web block but could someone please exactly what to do?

Do I insert the webblock in the current table records? 

Hello Werner

Yes. You should have a TableRecords Widget on your screen and another TableRecords Widget on your WebBlock. Then you only need to drag the WebBlock into the 'parent' TableRecords.

Note that you need to have something that binds the parent List to the Child one.

For example, let's say you want to list teams and the players on each team. In the 'parent' table records you will do a simple query to get all teams, and on the child table records you should make a query to get all the players. Your WebBlock should then have a TeamId input parameter and that input should filter the players like Player.TeamId = TeamId. This way, when you drag the WebBlock to the parent table records, all players will appear sorted by team


Hope this helps

Regards,

Ângelo Sousa

Hi Werner,

Could you give an example what you want?

Johan den Ouden wrote:

Hi Werner,

Could you give an example what you want?

Maybe this topic will also help this discussion or can be merged:

https://www.outsystems.com/forums/discussion/32849/two-tables-in-same-list/


Yes I think that's what he wants!

Werner Kotze wrote:

I am aware that you must make use of a web block but could someone please exactly what to do?

Do I insert the webblock in the current table records? 

Hi Werner,

As Angelo says you can use web block to achieve List in A List.

Given:

- Team Entity

- Player Entity,  where Attribute TeamId is a Foreign Key to Team Entity

Find:


Cookbook:

1. Create a webblock players with a tablerecords widget inside:

2. Create Input Parameter in the webblock:

3. In the preparation action of the webblock, create an aggregate of the players:

4. In the main screen, just drag the web block and give the associated value to the webblock's input parameter:


regards,

IB 


Hi Werner,

Below are example how can use webblock inside TableRecord:



Regards

-SK-