How to default example data for a new user?

So here’s the scenario: when a new user signs up, I want to create some example data for them, so when the signup worklfow navigates to the main page they have something to see instead of a page with no data.

Sounds simple? Just extend the workflow that signs them in and add a few extra workflow steps for a first time user, right?

Having searched the forum, I’ve read lots of posts relating to add list, set list, copy a list of things, API workflow on a list of things, etc but I can’t get anything to work.

Even if I could get a straight copy to work in a workflow step, one thing that might further complicate this a bit: I want to copy a number of records from “Data Type A” to “Data Type B” where A (holds template data) and B (the user’s data) have different data structures.

Any further thoughts?

For the fields associated to the user, you can add default values in the fields in the Data tab. Is that what you’re looking for? This way, every time a new user is added, they get those default values.

1 Like

No it’s not that. This is to create new data entries in different data types, to give the user an example set of data to work with. Help them to understand the app better. They can then adapt the example data, or delete it and go off create their own data using standard app functionality.

Oooooh, I see. Sorry bout the confusion! I tried something like this in an earlier app, where I needed each student I created to be assigned about 400 skills upon creation. I tried to use the API workflow on a list functionality, but it took a really long time and gave the impression that the app was broken. Sorry I don’t have a good answer for ya.

1 Like

Off the top of my head I’d use custom state lists (one per data type) in the group where the input fields are located. Then you could have a ‘sample’ button in the group that, when clicked, sets the group’s custom state ‘use-sample-data’ to ‘yes’, then run a workflow to reset the group’s data. In the input’s conditions, set the initial content to the group’s custom states when ‘use-sample-data’ is ‘yes’. You can then do other things in the conditions when ‘use-sample-data’ is ‘yes’, like disabling the input.

The tedious part of this approach is the custom states of the group, and the inputs’ conditions. But conditions can now be copied and pasted, so that would speed it up. The workflows would be two steps when toggling the ‘use-sample-data’ between ‘yes’ and ‘no’: toggle the ‘use-sample-data’; and reset the group data.

Thanks for the feedback and the suggestion. There has to be an easier way to add a few records to a user table on setup though. Perhaps load example data to a hidden RG first, then save all entries from that RG. I haven’t figured out how to save all entries from an RG in a workflow yet, also sounds simple but cannot find a solution so far :frowning:

Anyone have a simple answer to this with easy to follow screenshots?

I want 5 things (all the same thing) to be assigned to a User after sign up.

At the moment I’m doing 10 x separate ‘create new things’ in the workflow. 5 for the thing and 5 for another thing this thing uses.

As far as I know, unless otherwise specified…all Data created on the “Live” app branches across all users. As such, I believe that if when you launch your app you create a user yourself, and input the data you wish to exist for all users, and Don’t restrict that specific Data to the user you’re using, that Data should be accessible to anyone who logs into your app.

I’m fairly new to Bubble, but I’m picking it up rather quickly. I have yet to need this functionality. But I’m almost positive this would work.

In fact, come to think of it, I’m working on an app that could use something like this, so if no one else gets to try this theory out before me, I’ll be sure to post the results in the coming days.

Good Luck, Bubble On!

Did you get this figured out @mikemar10?

Unfortunately I did not. I ended up not needing it for practical use, so I never got around to trying it out. Apologies.

I don’t know how big data you’re going to create. It may take as long as @andrewgassen says. I’m doing it on a Professional plan and my app has a 7-step form, the data is prepared as the user fills it out.


Good luck

Hi All.

Appreciate this is an old thread but it does seem very relevant to a specific question I’m facing…

I’m trying to work out the best way to get a user which I have setup with all my sample data to copy to all new users created.

I can’t seem to find a way to do that. It seems that all the users above were trying to do the same thing.

The types of things are defaults for lists which the user could later change
Example fully completed elements that the user can then review to see how they look after all the relevant steps have been completed
Etc.

Basically it’s data which allows the user to see what will happen in every section of my app after they have been using it successfully for a while.

Is there a good way to do this? Manually creating 100+ elements one by one using create thing in a workflow does not seem to be a good way to do this.

My ideal would be to setup one user which works as a seed and then have an operation to create new user which allowed me to use the seed data as a base.

Hi,

My solution was to create a SAMPLE data element, data, and content viewing group. When the user clicks to view the sample data, they have the option to adjust and save the data. When they save the data - they are “creating a new thing” or a new record in the live (not sample) data element. This preserves the sample data that all users have access to - but gives users the opportunity to adjust and create their own records from the sample.

@david.willden Could you share screenshots of your solution, especially the front-end ones?