List of 'things' in a single table field/cell - what's the correct approach with Wapper?

Hi all,

In Bubble, it’s pretty easy to just create a list of things in a single field - I’m sure it’s simple in Wappler - but I haven’t been able to find how yet. If anyone wouldn’t mind please pointing me in the right direction that would be appreciated.

1 Like

It is just a join with another table. Bubble represents it visually as a field that cointains a list of objects. But under the hood it is just a Join.

3 Likes

Thank you @JonL still adjusting my thinking. This is helpful

1 Like

Hey @JonL returning to this, so I have a single database entry, that I want to assign to multiple folders, I’m really not sure the correct way to do this.

I only have one reference field to assign this entry to a folder, and the folder only one reference field for this database entry. I need the folder to be able to know that it has say 10/20/30 entries assigned to it, and the other way around I need the entry to know it is also assigned to say 5/10 folders.

Can you advise what the Wappler way to handle this would be?

I got lost with the folder part. I think you are mixing technical with functional. Can you describe it all in functional terms?

Sorry @JonL I absolutely am doing that.

One functionality I’m building out, I have a folder system, dB: ‘Folder’ and then I want to store entries within that folder, as a kind of heirarchy.

So:
‘Folder’ will contain entry 1, entry 2, entry 3, entry 4 and so on.

I also want to be able to know which folders entry 1 is in, for example:

Entry 1 is in folder 1, folder 2, folder 3, folder 4.

This way I can create a repeating child that shows all ‘entries’ that are in folder 1.

and I can also create a repeating child that shows all folders that entry 1 is within.

In terms of the DB/ Workflows.

Each entry has a single reference link field called ‘folder’
Each folder has a single reference link field called ‘entry’

I’m at a bit of a loss how I can achieve the above?

Still lost with the folders. What are folders in your app? File system folders? An entry in certain table that you describe as folder?

Also those two assertions don’t seem to be compatible.

Folder is funcional, purely user experience - not technical. So let’s say a user creates a folder in our app, to store images - they can then upload images to the folder and then when they login they can click on the various folders to see which images they have stored.

I think you might be looking for a join table to save the relationships between the folders and entries.

So you have a folder table, and an entry table.

Then create a folder_entry table which saves every ‘link’ between a folder and an entry. It only need consist of a folder_entry id, a folder_id and an entry_id (you could add other fields if needed).

You can then search this table to get the relationships either by folder, or by entry and get the data for both folders and entries using a join query.

1 Like

ahhh ok. This is clear.

So instead of ‘joining’ the two tables together, I instead have a table between them that facilitates this. Thank you @sbecks much appreciated.

Sorry @JonL for not being super clear in my explanation!

1 Like

This article will prove itself helpful when designing your database.

2 Likes

Thank you @JonL - on my TDL for today to read and digest this.

1 Like

Don’t worry at all. Sometimes these questions we ask can be annoying but in the end they are asked to save time in the long run.

Good to read that you are already moving forward.

Also, although there are still some things missing for your app like a connector for S3 don’t you worry at all. The team will build it sooner than you can imagine as it already got a lot of attention.

And if you can’t bare the wait(totally understandable) just go to bubble forums and read the last drama episode about things not being built and the community being ignored.

A year ago I left Bubble after spending three with them. I got a lot of heat for giving my opinion publicly by some of the people that are now bashing Bubble big time in that post.

Sometimes I make some popcorn and have a read at Bubble’s forum. Normally it pays off.

3 Likes