Different type of users, rooting them to different pages

I’m pretty new to nocode technology. Sorry if I sound naive here.
So we are building a food delivery system where there will be 3 types of users namely users, delivery agents and restaurants.
I’ve figured out a way to separate them using “User_type” in Users table.
The signin page for all three types of users are different.
The thing is that, the main page of restaurant which is “Manage restaurant” has been set to type “Restaurant”. When the restaurant signs in, they need to go to the Manage restaurant page. But when they’re signing in, they’re in the type “User” So I’m unable to redirect them to Manage restaurants page since it is of Type “Restaurant”. I’m stuck.
Sorry if the question is confusing.
Any help would be greatly appreciated.
Thank you so much for your time.

In your login workflow, you should three steps

  1. Navigate to User (Only-when user type = user)
  2. Navigate to Delivery Agent (Only-when user type = agent)
  3. Navigate to Restaurant (Only-when user type = restaurant)

For populating the manage restaurant page, you’ll user Current User’s Restaurant field. You should link the restaurant field to the User data type. Or reversely you would search for restaurants where Users = current user.

Hope that makes sense. We have a tutorial for this exact scenario at nocodify.com

1 Like

Hey @Nocodify, Thank you so much for your reply. I’m trying to do the same. I’m searching for restaurant where email=current user email. But that expression is getting evaluated to a “text”. The “Manage restaurant” is set to “Restaurant” type. I’m getting that error instantly

You should add a “Restaurant” field into the “User” data type. That way you have the restaurant that they are associated with. So on that workflow step (for navigating to manage restaurant) you would insert “Current User’s Restaurant.”

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.