The intricate design of the table - repeat data in the cell

Hello,

For a better understanding, I will describe first the task I am trying to implement and then the problem I encountered.

I have a complex query that combines multiple field rows in a single cell (using group_concat). The result is a table with two fields in which the data is combined. It looks like this:

The data in the “Name” column corresponds to the data in the “Link” column, as follows: Name1 has Link1, Name2 has Link2, Name3 has Link3

I need to convert the design of the table so that the following table appears:
3

In the “Doc” field, there are buttons That have names from the “Name” column and a link from the “Link” column. In this case, it is not known in advance how many buttons will be.

To implement this task, I created a column “Doc” in which I inserted a button. Then applied the data repeat function with editing .split(","). The button was repeated as many times as necessary.

The problem I can’t handle is to give each button the correct name and link. At the moment, each button has a name and a link consisting of the entire array of data columns “Name” and “Link” respectively.

How can this be done in Wappler?

Thanks in advance!

Still can’t solve the problem. I will be grateful for possible ideas of implementation.

You need to investigate Nested Repeats. This is where you have a repeat with further repeats inside of it. When implementing you essentially stack the nested child repeats inside a parent repeat. This in turn repeats the items contained within the child inside the cell of the parents repeating row (inside a table for example).

Teodor explains it here:

4 Likes

Thank you very much! It’s not just what I need, it’s even more than I wanted. Following the recommendations, I not only implemented all the tasks, but also was able to optimize the work on the server side. I was able to abandon a complex user query to the database and implement it through a server action consisting of several nested queries. Database queries have increased, but they have become very simple, which has accelerated the work on the server side. The ability to create complex tables by connecting nested queries is an amazing tool that allows you to create incredibly complex data views. Thanks again for this tip!:+1:

3 Likes

I think a lot of us feel exactly the same! :smiley:

Am very happy to have helped. Good luck with your Project.

:slight_smile:

2 Likes