Forum Academy Marketplace Showcase Pricing Features

One to many relationships

hey all

im new to bubble so still trying to wrap my head around the database, im used to using SQL.
i have an issue that im sure someone on this forum will be able to point me in the right direction.
im building an asset management tool, in this site you can create events on each event the user has the ability to attach mulitple photos to the event.

i have two datatypes

Events and Events-Pic

i have linked both together by adding ‘id’ from events into Events-pic

but how is the id from the event saved to the Events-pic when i create an entry into Events-pic datatype from a form, this form is creating a new thing in Events datatype, and further down the form, is an option to add a photo and a title, this is aved into Events-Pic but how do i link the both together?

Don’t use the id field. Bubble already has a built in way of connecting datatypes and it is done with the way you set up your datatypes.

So you have your two datatypes but in Events, you add a field called Events-Pic and the type you choose is “Events-Pic”. Scroll down in the list and you will see this (and every other) datatype in the list. If it is not in the list, it means you haven’t created the datatype yet.

You then click the tick box to “make this field a list”. Then in your workflows, you will “add item” to the Events datatype.

For example, you’ll have “make changes to a thing” workflow where that thing is “Events” and then you’ll be able to add the Events-Pic to that thing.

Hope this helps.

Hi, @stuart.roberts! :wave:
By chance, have you checked out the no-code courses from Zeroqode? It includes tips for how to create user management app :slightly_smiling_face:
Also if you’re looking for useful info for planning the database, let me suggest you visiting Zero Code Series 1.4, where experts in Bubble app development will discuss details of planning and building a fast and effective database in no-code. The event is free, all the details you can find at its page: Zero Code Series 1.4 Tickets, Thu, Oct 7, 2021 at 10:00 AM | Eventbrite .

And here is the direct details for joining: Launch Meeting - Zoom

Meeting ID: 861 3419 2597
Passcode: 836746

You will have a possibility to receive a reply to all your questions from the Bubble development experts Petter Amlie, the author of “The Ultimate Guide to Bubble Performance” and Founder of Amlie Solutions and Vlad Larin, co-founder of Zeroqode . Please drop us a line in case any questions arise :wink:

Best regards,

Veronica Kornilova
Marketing Manager @ Zeroqode
#1 Bubble Publisher and Developer

logo-icon-S-circle

100+ Bubble Templates
25+ Bubble Courses
250+ Bubble Plugins
20+ Bubble Building Blocks
Convert Web to iOS & Android
No-code Development Services
Zero Code Conference Replay - watch all the no-code industry leaders share their expertise

hi thanks for the reply, im not quite getting the process, ill explain it a bit better.

button on page → create a new thing (datatype events) New event (new page)

new event page
inside new events page is tab control, inside this tab control is two fields and a button, field one is picture uploader, field two is text box for picture title.
button → create new thing (in events-pic)

i have added field events- pic to events
i just dont seem to be able to find how to link the unique id from the events-pic to events field