Create a default database entry for every user there signs up

So im making a task and order management system and i want my new signed up user to have some data to start with so not everything is empty when they sign up…

In this case i wanna make such a thing as a default order confirmation templates, there will be created and available for my users to use…

Then they will have to have the option to delete that one and make there own fitting to there preference…

But how do i make an entry with that, there is available for every user and overriding every privacy rules there is… and also if they chose to edit it how does that edit not affect tither users

you’d have to create unique entries per user
that way each user can edit/delete the entries

So i just do that in the sign up workflow with create a [order confirmation] or how do i do that ? Wouldnt that just fill my database with tons of the exact same entry ?

You could have a default filler data Item / Thing that can’t be edited but that every user gets access to. Otherwise, yes, you’ll be creating a new thing for every user, which isn’t a bad thing. I have a cocktail recipe app, and every new user gets a Bar (list of ingredients) and a Menu (list of recipes). I don’t create these until the user confirms their email address.

1 Like

Can i maybe make an manuel admin entry in the database and then in the sign up workflow make a change to current user’s template to chose that one…

If that is possible what expression will i need to use in the signup workflow to go grab that one in the database ?

set the slug to something like “systemdefault” and then search for that thing via the slug.

If it’s just a tempalte they reference this is okay. But – if the user is supposed to edit some details about this, then you will need to create a duplicate (new row) at some point, you can take all the data from the systemdefault one still.

2 Likes

Thanks for that answer :blush: that kinda make sense… So would that expression “be parent groups template’s slug is systemdefault” ? Or what expression will you mean i should use?

First, If you manually create the record, also manually set the slug to systemdefault.

Second, to display that specific record somewhere – do a search for “Item” where “Slug = systemdefault”

One note: based on what I’m reading on this thread, it seems like this may not be enough for your use case. If you are simply “showing” the record, then that is fine. If the user needs to modify the record, then you still need to create a new one.

Thank you very much… ill try that

That specific one they are not able to edit… so im gonna make a condition that when current rows template’s slug is systemdefault the edit button is not showing

But they are still allowed to create new template things there will not have that slug and them they will be allowed to edit…

And I have maked a checkmark for each row to define witch one of the template there will be the active one for use

1 Like

@hi.luisacosta
i got that settted up now and it seems to work intentionally…

but i encounter a new issue then… because the template is admin maked by me and i have a privacy rule for not letting people see everyones data saying
Current User is This Templates Creator and Current User is Current User

so it finds it by the slug but it doesnt show it because of that privacy rule

Easy fix — add a privacy rule that says when slug = default slug , everyone can see it

2 Likes

it worked! thank you very much

1 Like