Group Columns

Hi, everyone. I am new with OutSystems and I hope you can help me with this. Thank you.
I want to have a table where, in a column, I can list only once a CATEGORY and, in the next column, all SUBCATEGORIES belonging to the respective CATEGORY.

With the following, I hope I can explain better.
So, instead of this final result:

            a                          1              
            a                          2
            a                          3
           b                          1
           b                          2

I want to have this:


            a                          2


Is this possible? With Aggregates?
Hello Filipe,

Have you tried making a group by in the aggregate itself? seems like thats all you need.

Something like this : )

Best regards,
Thank you for your answer, Cristiano :)

Yes, I already tried this. However, grouping by the categories column turns the other one (subcategories) in a grey tone, and not available in the Preparation.

So, in the Aggregate screen everything seems fine when doing the 'Grouping by' the Categories attribute:

But, in the screen I am unvailable to use the "SubCategoriaSaida".Nome attribute:

Any idea to make this right? Thank you!
Assuming the Sub Category names are unique, all you need to do is group by that column as well.

If not you can group by SubCategoriaId and then make a new Attribute to retrieve the name.

Anything let me know : )
Yes, the SubCategory names are unique. Your suggestions didn't work :( I had already tried that too.
Here is what I did:

Group by subcategory names

The result was:


Any ideia?

Yes, this  is exactly what you need. just see it in a different way. The aggregate will return a line for each line it takes a match. I suggest the following: 

Order the first column by name, that will order the category as well.

Then in the expression make something like this.

Instead of:

change it to:

if(ListRecords.List.CurrentRowNumber > 0,if(ListRecords.List.Current.CategoriaSaidaNome = ListRecords.List[ListRecords.List.CurrentRowNumber-1].CategoriaSaidaNome, "",ListREcords.List.Current.CategoriaSaidaNome),ListREcords.List.Current.CategoriaSaidaNome

Hope it goes well xD I'm just writting this while thinking about it.

There are however plenty of other options. You can do a webblock that receives a categorie Id and displays a list of sub categories then you just need the first part of the query to retreive the main categorie ids by group.
Ingenious!!! I didn't know we could do that! That worked well.
About the webblock solution, I'm not sure I get the idea. Bul I'll give it a try.

Thank you, Cristiano :)
Hi everyone;
Is it possible to pass the .oml so we could try this and see it on our own enviroment?
I've been trying this too and sadly I didn't get good results (xD). I am looking for the same results that Filipe wanted.

Thanks in advance