Can you use Subtables with Existing database?

The subtables appear in orange in the Query Builder Window. Can you please attach a screenshot of the Database Query Builder Window listProjects?

“Query Builder” does not have the subtables.

I’m pretty sure seen as your tables aren’t named with a prefix even in the query manager they are green, once you select your main table they will display any related table at the bottom of the fields which also as they aren’t named are green

Actually you are correct, the last table is MEDIA in green! I didn’t seen.
But on the App side it doesn’t appear to select for the 2nd repeat.
SO, do I select the MEDIA table in the Query Builder? or not

You can select media and it will return the images as an array or if you join them it will also add the parents fields to every repeat I’ll try find where hyperbytes explained the data output

Here’s the explanation

Okay, Media is now coming up on the app page to select… but its still not displaying the data

Have you tried double clicking it in the query builder it opens a new panel for that table

You click where it adds the fields your outputting not where it lists all the fields in the table on the left just to specify

double clicking doesn’t work it just adds it to the columns.

You need to click to the right where it adds it double click what it adds

oh yes! that worked! when I double click it opens another window. I added the fields I need. Do I need to set a condition or it should be okay because it has a foreign key already

This condition would be if you only wanted certain media for example say you have a media type field and only want png you’d need to condition if you want all from that project you won’t need a condition most likely depends on the data really

Okay. Something is not right, on the App, the Media doesn’t appear under the main query. In appears int he Serverconenct but nor in the parent nest. So I can’t select it like you had in your code.

Maybe check this out for how to use the data

I will try to start again. I will let you know how I go. Thanks for trying to help. Its frustrating not getting nested repeats happening. I don’t mind which way I do it. Its doesn’t have to be Subtables, happy to use normal joins. … I just want it to work.

Okay the App side it giving me the options to select… But the query doesn’t display the Media data. its blank. The main table data appears fine. but not the subtable media

If you create a new API and add main projects table, does it show media as a subtable in orange in the Query Builder?

It displays media, but not in orange. It display in normal green.

When you double clicked did you add fields you needed like you do with other queries? Also what does the binds look like for the media is there a chance you selected it from somewhere other than the repeat

Have you also tried inspecting what the query returns in browser tools under network XHR it will show the action (might need a page refresh once in browser tools)

The issue is with the query side/subtable - the app side binds are okay.
So when I test the query, Projects display correctly but Media is empty - I tested this in Network XHR - this is how I know the server side is the issue.