14
Views
6
Comments
Solved
List Group By Term
Question

Hello,  

How do I group with Lists.  My older system has "ListRecords" and I cant seem to copy over.  So I am trying to recreate this list.  It needs to be grouped by "Term"  If you look at my attachments.  You can see the old way I am referring to and what I am expecting.


How do I do that the new way with Lists?  (see new way pic)


new way


OLD WAY and what I needed.  List broken By "TERM"


Rank: #54
Solution

Hi Dan,


In general, from your screenshots you're implementing the right thing list with a block receiving the id from the list, although you have a lot of warnings on your screen.

What is the problem you are running to?


I'm sending an example OML in attachment with this use case, hopefully it will help you understand what you are missing.


Kind Regards,
João

ReactiveSandboxListOfLists.oml

Rank: #54

Hi Dan,


Looking at your old example, it seems like you have a list of lists. Where your first have a list of terms and then for every term you have the list of courses.

The simplest way to display a list of lists in OutSystems, is to have the second list as a block which in your case would display the courses given a term is.

In this way your screen will have a list of courses and instead of having a list item, this list would have the block mentioned above.

You'll need to tweak a bit the css and add the average and totals for each term but as it worked for the "old" approach it should also work for the "new".


Hope it helps.


Kind regards,

João


Rank: #20747

Im am very close.  List of Lists.. but I am missing something.. here is what I have now.  I have the web block.. but I am missing something.. probably small.  Any hints you can give me to get me in the right direction would be appreciated.  I guess Im old school and I am to use to "Preparation" to build the form. :)





Rank: #54
Solution

Hi Dan,


In general, from your screenshots you're implementing the right thing list with a block receiving the id from the list, although you have a lot of warnings on your screen.

What is the problem you are running to?


I'm sending an example OML in attachment with this use case, hopefully it will help you understand what you are missing.


Kind Regards,
João

ReactiveSandboxListOfLists.oml

Rank: #20747

Hello,  I was able to create the list just like your sample.  Thank you for that.  Now.. how do I get rid of the extra ones that don't have data ... so.. I only want the ones the user has.  If you see in your example it shows them also.

how can we clean this up so that it only shows what is needed... can you edit the attachment so that I can see what you changed to fix it.


Rank: #54

Hi Dan,


I am glad it worked.

You can enclose the table in an If and only show it if it is not empty, like the image below:


OML in attachment.


Regards,
João

ReactiveSandboxListOfLists.oml

Rank: #20747

Thats it... Thank you so very much.. It worked


Dan