I am trying to create access to our site for contractors and customers

  • 0
  • 1
  • Question
  • Updated 2 years ago
What is the best method when setting up page views for a customer or contractor. Would it be better to create a subcontractor page and a customer page and then add what is needed on both and limit access by user or group rules?
Photo of Joey Zint

Joey Zint

  • 1,780 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,448 Points 50k badge 2x thumb
Hi Joey,
You do not want to set up a Role per customer and per Contractor as that would be a nightmare of Roles.

Instead, set up a table of users where the Key field is the userid.  Then have a relationships where 1 Customer has many userids and you will the be able to associate every userid with a customer.

Then in each table that you need security on, make a  formula user field called [Current User] with a formula of User().  That will always be the current logged in User.

Then make a relationship back to the user table and lookup that User's company or "related company".

Lastly make a single Role for all Customers that they are allowed to see records in that table where the Company  is equal to the Current User - Company.



 
(Edited)
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
How many customer's / contractors are you looking to have access your application?  If its more than 20, you might consider using a Portal to connect to your app, otherwise paying for all those user licenses might get pretty expensive.   Especially if what they need to see / do is very limited.

20 users X $25 X 12 months = $6,000 per year.