Hello
Iโm trying to make an app where it has two different profiles (Say, seller & buyer). The sellerโs view will be different from the buyerโs view and one can be both. So right after login, I need a screen where the user can choose whether he wants to go to sellersโ views or buyerโs view. How can I create a screen where the user can make this selection?
The flow chat would be like the following:
Loginโ>Seller/buyer pageโ> (If seller)โ> Dashboard
โ> (If Buyer)โ> Markerplace
Also, I want users to register via their phone number to prevent duplicate accounts (Like uber). How can I accomplish this?
Thank you
Varun R
Hi! Welcome to the community!
The best approach is to use the Show_If property in the Display section on the views to show/hide them based on what type of user they are.
In order to make this work youโll need to be able to identify the type of user they are upon login.
By the usage of the word โloginโ, it is implied that you will be requiring users to authenticate in order to use the app. This means you will need to add the users into AppSheet as authorized users.
I would recommend then to also include these users in a table, maybe named โUsersโ in which you record their Login Email and their User Type - Buyer or Seller or Both - plus add other user related info you wish to keep in the app.
With this table you can then create an expression like the below to insert into the Show_If expression for the Buyer views (if you are not aware, USEREMAIL() is a system function that returns the logged in users email listed in AppSheet):
IN(LOOKUP(USEREMAIL(), "Users", "Login Email", "User Type"), { "Buyer", "Both"})
Or this to insert into Seller Views:
IN(LOOKUP(USEREMAIL(), "Users", "Login Email", "User Type"), { "Seller", "Both"})
I hope this helps!!
manโฆ this answer is gold !
I created a new column as you asked. I have created a new view called โProfileโ which is in the menu view. When I click the profile, It shows me the userโs email and Yes/No for the buyer field.
I dont want this to happen. I want to view the app as a user. And there will be multiple users like this. Their data is personal to their account only. All the users should not see all the data. Thatโs just stupid.
After login , user should chose Yes/no for buyer field. Depending on his selecting, the app should change. Thatโs now happening here. Its just showing all the users and their data.
Maybe Read up on security Filters.
You may not understand it all right away and thats ok, but read up on it.
User | Count |
---|---|
16 | |
11 | |
9 | |
8 | |
4 |