13
Views
4
Comments
Solved
Cycling through aggregate to populate data in separate widgets
Question

In a single block

I have an aggregation of 5 records  / 3 columns

After a fetch...

I want to cycle through these assigning each record data to its own card widget that has local variables matching the columns.  And show these on screen together.

Can you offer advise how to do this?

Thanks

Rank: #1129
Solution

Being relatively simple the direct ListRecords approach was fine (although in V11 seems to be just called "list").  But noted also on using webblocks for future use.  Thanks Guys.

Use a ListRecords in the screen and the Card widget in the content of the record of the list.

Hope this helps 

Graça

Rank: #493

List and block is the good choice

Rank: #170

Hi John,

You may also try to use web blocks if your cards have a lot of info or custom actions and you want reuse it in other places.

As Graça said, if you use a list, and in each list item content, you place a card (Or web block) linking the information with your aggregate.current item. You will be able to achieve it.

I suggested the web block because if you need to format your data in any way before showing it, for example, you can do it in the OnInitialize of your web block (Assuming you are using Reactive web apps, if using traditional web apps you have the preparation of each block) 


Other solution, if you need to change a field of your aggregate before showing it in the screen, is to use custom attributes in your aggregate, this way you don't need to use the after fetch action:


Cheers and Regards,

RR :)

Rank: #1129
Solution

Being relatively simple the direct ListRecords approach was fine (although in V11 seems to be just called "list").  But noted also on using webblocks for future use.  Thanks Guys.