Create paired data relationships

Hello,

I am trying to create data that pairs with another data set. In other words, for a given Set 1 (where values are ABC) I want Set II (DFG) to pair as follows A to D/ B to F/ and C to G.

I have had no success figuring out how to do that on the data side. Your help would be sincerely appreciated. Thanks!

In your datatypes, when you create a field, you can set it to link to another datatype, and then for each thing, create the appropriate connection. You can those connections on the back end, or in the front in via a create/edit form. Whether you connect the link it one way (Set 1 refers to Set 2 or Set 2 refers to Set 1) or both ways depends on what you need in search and display.

You can manually create these linkages on the back end in the Data section, or in the front end via whatever forms you build to create/edit.

And… if your question is more complex, relating to logic (such as sequentially connecting data), I haven’t done that before, but would look into things like numbering your things and using that to match them up.

Hi Ed,

Thanks for your help. I think I’m still halfway on this one; When you mentioned front end linkages, would that be through the “workflow” section?

I’m trying to pair these two specific values together, but I don’t think this is what you had in mind. If you wouldn’t mind elaborating, I’d really appreciate it! :slight_smile:

Basically, I’m taking Problem data from a previous page, and dynamically pairing it with what I write as a “solution” below it.

Hi, by “front end” that means the forms that your users are interacting with. It looks like you’re building what is essentially a user commenting app – users post comments (Solutions) on topics (Problems).

Bubble created a bunch of “how to clone x…” guides, and you may find one that suggests a good setup for this. Also, if you dig through Gaby’s (@romanmg) Coaching No Code Apps videos you may find a relevant one.

I haven’t set up user commenting, but the basics on how I’d think about it would be…

  • Create two datatypes in your database – Problems and Solutions
  • Datatype Problem has fields like the Title, Description (if you want one), Date, etc.
  • Datatype Solutions has a bunch of fields… User, Date, Solution Text and also a field that connects the Solution to the Problem. (Note you could also do it the other way around, having a field in Problem connecting to a list of Solutions – the right approach depends on the size of the database and also how you plan to search and display info. In the performance Q&As on the forum there are discussions of pros/cons for the approaches.)
  • With the “Save” button workflow, have it create a new thing (i.e. entry) in the Solutions datatype, and populate the various fields. You can populate the field in Solutions that links to the Problem by having it fill in based on the Problem dropdown you’ve screenshotted. That way the Problem and Solution are linked – and below a Problem listing you can display a list of the related Solutions.

Generally, you may want to take a step back and go through the user manual and Gaby’s videos, especially any relating to data and user commenting. I say this because spending that time upfront to build a good foundation for your database is often easier than building and launching, and then later having to go back and fix things which is harder to do once your data set grows.

Hi Ed,

This is really excellent advice. Yes. Though I’ve read the user manual and looked for good videos, I think getting proficient at Bubble will only help scale. I’ll try to work with what feedback and advice you have generously given.

Best

Good luck with it! I found the initial period with Bubble hard since the platform is so open ended and the learning materials are fragmented, but once I started picking up how Bubble “thinks”, things started to fall into place and my building started moving a lot faster. But I still have a lot to learn.

This topic was automatically closed after 70 days. New replies are no longer allowed.