Nested Paged Query with Table Generator?

Then it’s not nested queries what you need.
Steps should be:

  • query 1
  • repeat (query 1)
    • setvalue step (here add the query value you need)
  • query 2 (filter it with the setvalue step value)

Dave.Bit confused but are you saying you want to select a single value from table 1 then select multiple child records from table 2 where there are linked via a key from table 1?

Hi Brian,
Yes from table 1.

Thanks Teodor will give that a try.

OK, can I use a a simple example then to help me understand

Say you have events in table 1 with primary keys

and bookings in table 2 referenced with the event Id’s as foreign keys

So you want to select the event from table 1, get its primary key and then select all entries from table 2 with that key?

Exactly, throw in two DB connections as one table is on Connection 1 and the other on Connection 2.

Really appreciate both yours and Teodors time, especially on a Sunday evening!!

I’m sure I’m being totally stupid here and am very sure I’ve done this several times before…

why two different DB connections, 2 different databases?
That is the complicating factor if so or it could be done with one simple data query

Unfortunately it’s the way it is with this Client. I may just write a trigger to replicate everything from db1 table 1 to db2 with a new table… They are both hosted on the same box… Was hoping I could do this within Wappler though.

Should be possible, just need to properly visualise what you are trying to achieve

List of Tickets on screen (jn table or similar)
Clicking ticket in table 1 returns all entries about that ticket in some sort of table secondary table 2 (or modal or whatever)

1 Like

I’m going to come back to this tomorrow but for now to get it working for Monday morning I’ve implemented a trigger on db1 to insert/update/delete entries in to db2. Then simply pull the query from db2. Dirty but gives me time to think!

I’ll outline it tomorrow Brian (properly). Really appreciate your help sir. Otherwise my missus is going to make me muck out three horses for ignoring her all evening, stuck in a loop hahaha…

:wink:

Lol, i feel your pain . do what I do, my 2 horses have a field shelter and go in and out whenever they want, open access. That way they rarely actually dirty in the stables. Havn’t mucked out in 3 years since I started doing that!

1 Like

Right got it to repeat what I wanted in the end:

Server Connect:

Repeat on the page itself:

5

The results are repeating as expected but paging simply does not work selecting the same repeat (repeat1 in this example). Obviously as there is no paging data within the repeat step despite the initial query being paged and the output query being paged.

Interesting exercise and as this post has been unlisted one only those that have responded to will get to see. I’ve since had permission to re-structure the databases as I see fit so have lessened the complications considerably so the above is not really required, but still as I mentioned, an interesting exercise in perseverance none the less. Although I did not get the paging to work I can settle my mind now… Well kind of, you know the apple! Bit of London slang there, apple-core (score) :wink:

Thanks all! Just wanted to update this post and shine a light on what was done to achieve a semi-pleasing outcome.

:smiley: