[Solved] Creating data relations the first time

I’m trying to set up my first relational table between two things:

The user creates an organization (new thing), and then the user ID and org ID is loaded into a relational table because there is a many-to-many relationship (one person can have multiple orgs, orgs can have multiple people.)

So I thought I’d have one action to create the org, then a following action to put the org ID and user ID in the other table. But Bubble doesn’t want to take that. What am I missing?

It seems to me that Bubble tries to simplify some core database concepts so that the average Bubbler doesn’t need to learn as much about Databases. Likely works well for most, but for people know who databases, you’ll also have to learn how Bubble simplifies things.

In this instance, the user is a user, not a user ID. Bubble thinks of a User as the whole user, and not just the ID / key. You can then match tables based on the thing (i.e., User) instead of only the key.

To fix this example, just type in:

  • User = Current User
  • Org = Result of Step 1
1 Like

You’re right. Good catch. I wouldn’t have guessed that. Thanks much.

1 Like