How can I show grouped items in a table?

Hi all,

I want to display collection items in a table or collection list. It’s a list of sales data and I need to show them grouped by the publisher company. I thought I could nest a table in another table. So the first table would be the list of grouped items, the second table inside the first table would show the single elements of each group.

As soon as I manipulate my array, I get the “Empty Items” error Any Idea how I can solve that?

Thank you very much.

Best,
Stefan

1 Like

Hi @stefank :wave:

I think you might be able to do it with one table.

Just released this video that covers a similar use case.

The first 2 minutes explain how filterByKey formula works. If you’re already familiar with it, you can skip right to the grouping implementation.

Does that help?

1 Like

Hi @Joyce,

Thank you so much, that helped a lot. There couldn’t be a better time for this video. I managed to group my items accordingly. I have a follow-up question. Is there a way to show a dynamic headline for every group? Like in my case I want to show the name of the publisher on top of the group.

Best,
Stefan

Hi @stefank :wave:

Hard to answer specifically because I’d have to rebuild exactly the same use case but I’d say finding a way to make the name of publisher container a repeated element would be the key here.

1 Like

I was able to get the result with two nested tables.

How do you nest tables?

1 Like

You can create a table and inside of a cell of this table you can display another table. Neat for some use cases.