top of page
Search

1 Person, Multiple User Roles in a Knack App


Hey folks, Dave Parrish here with another post about Knack databases. Today, I’m sharing a neat trick I’ve been using to streamline my app-building process. It’s all about assigning one person multiple user roles. This simple but powerful feature can save you time and make navigating your app much easier. In this blog post, I'll walk you through why and how you can assign a single user multiple roles and how it can enhance your experience as both a builder and an admin.


Why Assign One Person Multiple User Roles?

You might be asking, “Why would I want to assign a single person multiple user roles in my app?” Great question! Let me break it down.


1. View Other User Roles' Activity

One of the main reasons I assign multiple roles to myself is to view the activities and workflows associated with different user types. For instance, as an admin, you may want to see the workflows and activities of a representative or auditor. This is incredibly helpful when managing or training team members, especially if you’re on a call with one of them and need to see what they’re seeing in real-time. It makes things more efficient and gives you a better understanding of how different user types interact with the app.


2. Save Time When Testing

As a builder, I often assign myself all the different user roles because it helps me test various user experiences without the hassle of constantly logging in and out. For example, if I need to switch between seeing the app as an admin, a rep, or an auditor, I don’t have to log out and back in every time. Everything I need is right at my fingertips, allowing me to test and make changes quickly. This alone is a huge time-saver.


How to Set It Up: The Step-By-Step Process

Setting up a user with multiple roles in Knack is relatively simple. Here’s what you need to know:

  1. Navigate to the App Settings: Go to the App Settings and click on Header and Pages. From there, head to the Page Menu and scroll down to make sure the option to “Show Links That the User Has” is enabled.

    This setting ensures that when someone logs into the app, they only see the links associated with the user roles assigned to them. For example, if a user isn’t assigned to the "rep" role, the "rep" link won’t show up in their menu.

  2. Structure Your Pages Properly: When designing your app, make sure to structure your pages around the main user roles like Admin, Rep, and Auditor. These high-level pages should house the activities and workflows specific to each role. By doing this, you’ll create a clean and intuitive navigation system that allows users to easily switch between roles without getting lost.

    For example, instead of having separate and disorganized tabs for every user role, create a unified layout where users can smoothly switch between their roles as needed. This makes for a far more pleasant user experience, especially for someone juggling multiple roles at once.

  3. Use Shared Pages Wisely: Some pages, like Invoice Detail or Audit Logs, may be accessed by more than one type of user. For these, it’s important to set up shared pages. That way, a user in one role can easily navigate to the details without having to switch between multiple menus or pages.


What Happens When You Try to Add a User Role to an Existing User?

So, what happens if you try to assign a new user role to someone who already exists in your system? You might think that you can simply add a new role to an existing user account, but you’ll run into a little problem.


If you try to assign someone the Auditor role when they’re already an Admin, you might get an error saying, “That email already exists.” This can be a bit confusing because it seems like you can’t add a role to an existing user. Here’s the trick: Instead of adding a new user with the same email, you’ll need to go to Manage Users and locate the person’s account. From there, you can add a new role to them without any issues.


Tips for Managing User Role-Based Rules

When working with user roles, you’ll often need to create page rules or permissions based on those roles. Here’s a quick tip:


Instead of using a rule like "User is Admin", it’s best to use a rule like "User contains Admin". This is important because a user might have more than one role. The “contains” rule allows you to cater to users with multiple roles, ensuring that permissions are applied correctly no matter which role they’re operating under at any given time.


Additionally, when setting up fields like Created By, Updated By, or similar, always link these to an account, not a specific user. This ensures that if multiple people are involved in a process, the app won’t get confused by the different roles and user actions. You can create a field connected to accounts, like "Created By", and link it to the user logged in at the time, making it easier to track actions accurately.


Wrapping Up

It simplifies navigation, saves time, and allows for more flexibility in managing and testing your app. By following the steps I’ve outlined above, you’ll be able to efficiently assign roles, avoid confusion, and ensure smooth operation within your app.


Whether you're managing multiple roles for your team or just simplifying your testing process, Knack’s multiple user role feature is a powerful tool that can help take your app-building game to the next level.


Thanks for reading, and I hope you found these tips helpful! If you have any questions, feel free to drop them in the comments below. Happy building!


Interested in my Knack database services? ... Book a call with me here: https://calendly.com/daveparrish/callwithdave 




 
 
 

Comments


bottom of page