Creating new Things from option set selected list?

I’ve been scouring the forums and can’t find an answer, so I’m hoping one of you smart people might be able to give me some guidance here.

I have created an option set with “care areas” for a caregiving app I’m building, the idea being that the new user can select which apply in their caregiving situation. They will be able to create custom ones as well, but I wanted to simplify the onboarding process. Once bound to their private “care hub”, additional customizing will happen. So this is really just a starting point with suggestions of possible elements of one’s care hub.

I have a repeating group CareAreaRoleTypes inside another one, CareAreaTypes, and each RG CareAreaRoleTypes shows an option from my list inside of it. Selecting an item adds it to (or removes it from) the custom state (list) RG CareAreaRoleType selected. (Thank you, @romanmg, for the helpful video on that one!).

My goal is to have my “Save & continue” button create a new CareAreaRole for each item on my user’s selected list. But CareAreaRoles get customized once they’re in a user’s account, so I need a new Thing created, rather than just making a list.

I imagine this functionality is possible, but as a newbie, could really use some clear advice on how specifically to implement (eg, saying “go build an API” isn’t enough detail for me!).

Many thanks for any advice!


P.S. @gaurav, is this something your RG plugin might be helpful with?

You need to create a data type in your database that is labeled something like ‘CareAreaRole’ and have a data field that is of the type option (CareAreaRoleType)…then in the data type have a text field that will be set to the ID of the “CareGiver” who it belongs to.

Add whatever fields you need to add for the customization of that role.

Then if you want you can add to your ‘CareGiver’ data type a data field that would be a list of data type “CareAreaRole”…however, that is not even necessary because you can just use the text field on “CareAreaRole” that is set to the “CareGiver” ID.

Basically there are different ways to ‘relate’ or ‘connect’ different data types to each other, which is why you could add a list of a datatype “CareAreaRole” to the “CareGiver” or not. When you want to allow a user who is a caregiver to access and update their “CareAreaRoles” you could call that in various ways as well.

The different ways to call have different impacts on your overall app speed performance when doing searches.

Something I came to find out recently is that if I have a “CareGiver” who has a list of datatype “CareAreaRole” as a data field, and I create a search page, my results will take longer to load than if I did not have that list of “CareAreaRole” as a data field because all the data regarding “CareAreaRole” is also being loaded.

So it is faster if you don’t put the list onto “CareGiver” and instead just put a text field onto “CareAreaRole” that is the ID of the “CareGiver” it belongs to. That way when the caregiver needs to access their “CareAreaRole” to edit or update you can just 'do a search for “CareAreaRole” with constraint ID = parent groups 'CareGiver" ID" which is actually faster than if you were to try to access the list of “CareAreaRoles” on a “CareGiver” data type.

Sorry if I confused you, but I recently found this out and it affected how I setup my database causing me to change a lot of my app, so better to start off on the right foot.

If what you are really having a hard time doing is figuring out how to create a new thing for each “CareAreaRoleType” option that is in the list of selected options, you can create a backend workflow on a list.

Gaby has a good video on it

BTW I like your design.

Thanks so much for taking the time to respond and for that super helpful link to Gaby’s terrific video, which was exactly what I needed. Thanks, too, for sharing your insights about speed and architecture.

I also found the Maestro plugin, which helped a lot too.

And thanks for the nice feedback on my design. :slight_smile: Definitely continues to be a work in progress…

What is the name of the Maestro plugin? I can’t find it using that in the search bar for plugins.

@boston85719 Doesn’t this depend on the volume of data? That was my understanding based on and want to make sure I’m understanding that correctly.

"Short lists are faster than searches: Let’s imagine that your database has an object called Project and an object called Invoice . Each project can have multiple invoices. The default database structure would be to create a Project field on each Invoice object and then Do a search for Invoices where Project is equal x . However, if you’re looking to speed up your application a bit, you may want to create a List of invoices on each Project and refer to that list directly instead of doing a search.

But long lists are slower: The above only applies if the list is relatively small. Let’s imagine a different scenario - you have an object called Song and an object called Tag . Each song can have multiple tags (classical, rock, etc.) applied to it. In this case we wouldn’t want to store a List of songs on each Tag because that list may get very large and Bubble struggles working with large lists. Instead, we should have a field called List of tags on each Song and always perform a search for songs if we’re looking to access songs that have a particular tag. "

Check out this thread, as well as the linked threads on it.

What I have come to find is that I am getting much faster results not using lists of things as a data field…however, that doesn’t mean I am not using them for certain things, especially things that pertain to a specific user. But, things that all users can search for I am not using lists of things…and when a specific user might have more than 10,000 of something, I can’t use a list.

1 Like

Sorry, it’s Orchestra. Components include “maestro”.


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