Fairly complex nested repeater db

Hi
I have what (for me) is turning into a complex repeater within a repeater that I just don’t seem to be able to get to work, I have tried reading the other threads on nested repeaters etc but it doesn’t seem to quite fit what I am tying to achieve.

I have a page - “Transport Job” which has a variable “transport_request_id”. That page loads and has a number of quotes for that job. So, I pull in the quotes based on the transport_request_id and use a repeater to show the quotes on the page. That bit all works lovely.

Now each “quote” can have a bunch of messages, so I need to have a repeater showing the messages inside the repeater that shows the quotes.

I dont know how to pull it off, I tried messing around in server side with a repeater, where i had a query that got the quotes for the transport job and then the repeater got the messages for each quote, but I could not get that to display anything on the app side.

probably not explaining it very well. If it does make any sense is this the right approach? or should i have some repeater on the app side with the server connect in the repeater so the server connect does a fresh query for the messages for each quote? if so how do i pass the quote_id to the query on the app side.

think I have myself in a knot :frowning:
Thanks
Darren

I think you can achieve that fairly easily with a nested query in your server connect file. This is something i have set up. It just shows a business structure where you have a Business Name - > Department Name -> Team name.

So there might just be one business, but it could have 2 departments and each department having multiple teams.

The key is you need to use a key in the nested query that is matching the OUTPUT from the query its nested in. I.e. only show me teams that have a PK that matches the Department in each leg of the repeat. You’ll find this in the bindings in the conditions tab of the query:

The end result for me is this: Its just text in my case, but same theory:

Hope that helps. It’s certainly doable though.

Hi Darren,
Please check:

1 Like

thanks everyone, I got it working I think, I was over complicating it, i already had my repeater giving me the quotes, i should have just added a server connect repeater in that setup to get the messages, not have that repeater than another server connect with another repeater, it just got messy, once i stripped it back to basics, my first repeater giving me the quotes and added the query in that to retrieve the messages it sprung to life :slight_smile:

thanks again

2 Likes