Wondering if vanilla Bubble has the ability to send data to back end as a nested object, so that parent and child object can be created (and validated) at the same time from the same form?
For example, say I’m making a Yelp clone. I want a user to Add A Restaurant and Add A Review at the same time - which is very sensible, because you often will want to add a restaurant BECAUSE you want to add a review after having eaten there, and not just because you know the restaurant exists!
Yes, you can…just first create the restaurant, then create the review and add the related field of restaruant onto the review at time of creation…its just two steps
Sorry, I didn’t read it as “in the same step”, I read it as at the same time or as in title simultaneously. 2 steps in a single series for me is “the same time” or simultaneously as the difference is milliseconds.
But to your question of “in the same step”, no it’s not, as can only do create A new thing as in singular thing and of a singular type, there is no action for create new things, as in more than one, and if bubble does release an action like that, it’s probably multiple things of a singular type.
Well you somewhat can do it from a 1 step frontend workflow which triggers a 2 step backend workflow. Just pass the values and create the things in the background.
user submits review form
create review, send to backend
backend checks to see if restaurant is found and creates one if none exists (likely want to use address or phone for matching since name would be too generic)
if one found then link it, if none found then create it
however you’d probably want the user to add more information about the restaurant if it was new - so you’d likely want to do the restaurant check on the front end and then navigate them to a “tell us more about the restaurant” form/page
there will be a noticeable delay for the user on form submit if you do that since bubble has to do the search for the restaurant. to get around that, do the search in a group on the page and then reference that groups result instead - that way you do the search before button click so the logic will process instantly