Composite data types

Hello, brand new to bubble, and beyond excited at the possibilities this program makes possible.

I am working on designing my first app and running into a problem utilizing composite data. That is to say when when a Thing (in my case the Entity data set) is a part of the data set of another (Teams).

In my app I want to be able for a user to create an Entity (which is like their home page, and how they save data from around the app) and associate it with different teams. So I feel like I want in my data set:
[[ “team name” as a “list of Teams” ]] inside the Entity data set.

Is this a good approach in terms of data structure?

So I have in my test sign up page, The “Name” creates an Entity database entry, and the input for Team 1 (I want the user to associate themselves with several teams if needed) creates a Team database entry. I then want to take the next step, as a part of the same workflow, to add that Team to the Entities “list of Teams”.

That is all to say, the problem I am running into is resolving the “team name” into the “list of Teams”. Bubble adds the Unique id number into the list of teams.

So my two questions are : how can I get the team name to resolve into the Entity’s “list of Teams”

And is trying to do this with “List of Teams” actually a good way to do this?

Thank you for any help!

Hi there, @yoroanoke… if I understand your post correctly, having a field that is a list of teams on the Entity data type sounds like a reasonable way to go. I suppose you could have that list of teams on the User data type, but I don’t think you gain anything by going that route.

About Bubble showing a team’s unique id in the list of teams, I assume you are looking at the App data tab and seeing those id’s in the database. If you want to see the team names instead of the id’s, click the Primary fields button on the App data tab and change the primary field for Team from unique id to name.

If I have missed the mark with the primary field suggestion, consider sharing some screenshots so we can get a better idea of the issue you are having.

Hope this helps.

Best…
Mike

Yes that looks like it worked! Now to see if that data structure lets me accomplish my ultimate goal with the app.

Thanks!

1 Like