I am creating an app in which the user orders a service consisting of at least 1 (and up to 10 activities), each of which has 1 to n selectable variants (typically less than 10).
So, I created a wizard where the user first chooses the activities and sorts them:
Then he selects the variants (these not need to be sorted):
Finally, he clicks “Create Service” and Bubble creates the new service by performing the following operation in the Database:
Now, HERE IS THE PROBLEM: I need Bubble to create as many sub-services in the database as the number of activities chosen, multiplied by the number of variants selected.
So, in the above case (where “3 Tasks” and “3 Flavours” were selected) I would need to have 9 (3*3) Sub-services.
Basically, in the database I should get this (note: the following table goes beyond the selection of 3 tasks X 3 flavors and assumes the selection of “n” tasks and “n” variants using grey color):
Finally, at the end, another workflow adds the list of created Sub services to the Service - but this is not a problem for me.
I have carefully read many forum posts and watched several videos (n particular those by @keith, @petter, @NigelG, @romanmg, @boston85719, @cmarchan, @gaurav, @emmanuel and many valuable other bubblers), but I have not yet been able to find the right way forward.
I assume the solution is somewhere between “scheduling api workflow on a list” (on the backend) or iterating the list using the List shifter karmarawe plugin (on the frontend)…Both procedures are clear to me on one list, but I get lost because I am dealing with 2 lists, not one! Probably the solution is to create a single list by combining them, but I wouldn’t know how to do that since the 2 lists are composed of values that come from 2 different custom data types.
I would never stop thanking you if you would share what you consider to be the Best Practice to perform “step 2” described above.
Many thanks in advance