How to create a list of 'state values', then associated to a user during a multi-step signup flow?

Hi - I am stuck and experiencing issues with leveraging a custom state to store multiple values of a data type into a repeating group as part of entering those state values via inputs, before a user is signed up. Is there a way to support this?

MORE CONEXT - I am building a talent profile app and creating a signup flow that involves the user answering several sign-up questions, prior to actually creating the account.

For example:
Steps 1-7, things like “Where do you want to work”, “What kind of work are you looking for”, “What kind of pay are you looking for…”, “What is your job history?”

Then, after all of this is done, i have the user go to a final step of ‘create account’, w/ name, email, etc.

The step in particular i’m having trouble with is the “what is your job history” step. I have only been successful in saving job history records directly to the DB for each record and associated record values (ex: job history, with associated fields, job title, company, desription, strat date/end date). When I try to do this using a state, I get an error and am unable to use a workflow for set state on each value, or ‘make change to thing’ (as i guess that is only reserved for db values. . not states).

Does anyone have tips? I’ve seen some info online that states don’t work for ‘multiple lists’, so it may just be a limitation of bubble.

Lastly, if I can’t use states. . . would it be a workaround to instead just save the job history records direct to the Database, with associated user name as ‘null’, and then later save those records to the user during a subsequent ‘create account’ step?

If so, is there a way to help create a workflow to automatically delete ‘orphan’ job history records, for situations when a user abandons the signup process prior to creating their account and associating these records?

If i can’t figure this out, i’ll end up sacrificing user experience for ‘making it work’, and just move the user signup step sooner in the process. . but this kind of defeats the point of a multi-step signup flow.

Hiho,
could you provide some screenshots (with error message)?
I would recommend to save the user’s selected items (answers) directly to the database. This would have another nice feature…: A user is able to fill the form later…: if the user has already answered the first 3 questions (and the answers are already stored/saved in the db), the user could close the browser and open it another day later and go on to fill out the form at step 4.

Hi Jupixy -

I think you’re right, this is the right path. If i do this, is there a way I can setup a workflow to auto-delete ‘orphan data records’, after X period of time if the user doens’t come back to complete their signup? (i.e. do the last step of creating account, assigning to user record?)

Sure. You could create a backend workflow for example that runs to delete all records that created time is older than x … y (days).
Or … easy: on the form’s last page (or step), or after “on pageload” just fire a workflow that does that job (delete records older than…)

Thats a great solution Jupixy. I’m curious, if someone ‘didn’t get to last step’, like, they abandoned the application and never finished filling it out, would the ‘on pageload’, workflow still delete it?

Also - would that delete orphan records for ‘all users’, or just the ‘user who entered those records’? Does it reference cookies of a current user, even if the user doesn’t have an account yet?

“after page load” workflow will fire directly after the page is initial loaded. If you do any modifications inside the existing page (show/hide elements, navigate to next step in you repeating group,…) this event wouldn’t be fired. Only once after page load. should work for your szenario :wink:

If you’re using “privacy rules” in bubble, you should consider that the record could maybe be delete only by the user who created this one. by default privacy rules are not enabled for a new table so it should cover all records older than…

Do you know about privacy rules ? Important security feature from bubble. if not, you should read about it before continue developing … (spend 10 mins and watch a youtube video :wink: