Three type of Users in DataBase

Hi there,
Anthony from France :fr:

I’m working on a new app for coaching.

Problem / Context : 3 types of user : Coach + Player + Parent of the player

If i can, i don’t want to have 2 different app like : one for coach and one for player & parent

I need to understand how i can set my Users’s type in my database.

i saw here : that i can use boolean value BUT, in my case we deal with 3 different types.

How can i manage with this ?

Thanks community !

Hi @titoufetantho :wave:

Like this right?

Thank you

yes like this

but my question is more than a simple type selection :wink:

how can i do, for example to open different Home Screen for each case ?

Like this?

I did a edit

If you don’t want to do from true/false properties then you can create a collection ( Like types ) and add the three types and create a relationship between users ( Many to One). And then the opposite property will create on the users collection like Type.

Then go to the Signup screen and add the Type property in the form and then a dropdown will appear. Then on the Signup button add a link action to a new screen. You can add a lottie file like loading , A text or whatever like to show loading (If you need) on that new screen. Then create three home screens one for Parent, one for Player and other one for Coach.

And then add three conditional link actions to that created new screen with a lottie. You can add the three actions to the Lottie file after finish or for the screen ( Screen Action).

One link action is Link to the Home screen of Coach if sometimes the Logged in user > Types > Name > is equal to > Coach.

The add the other two link actions for the Home screen of Parent and Player.

The add the Screen Navigation Type of that screen to Home screen. Then when the user opens the app the loading lottie file will perform and linking to his home screen.

I hope this will be work for you.

And I hope I’m correct.

Thank you

1 Like

That’s on this thing i worked this morning.

I think i can use this method.

Thanks for your time Dilon.

1 Like

Now, it comes a new question …

how can i link them if they are in the same database ?

i want to link Coach to Player but need to have access to Parent who are link to their Player (=children)

Create 2 relationship inside Users Database ?

@titoufetantho I updated the app. You can check is it working that you have expected