Skip to main content
Question

Permissions - field access based on the value of field in a record

  • May 9, 2018
  • 0 replies
  • 81 views

I have activities form in my app, one of the field is company id in that form. A company will have many users. I want to hide specific fields in a form based on the logged in user belongs to the company or not. How i could achieve this?
This topic has been closed for replies.

Make sure the company users are all in a user field. I would use a List-User field where you can add up to 20 users. Add that field to your form rule and state When "List-User" field includes "Current User", show fields.

Hi Gil,

This is certainly achievable (if I'm understanding correctly) but the setup is a bit tricky...especially if you have a lot of tables and/or a deep hierarchy. I mocked up a basic example below. Keep in mind this is security by obscurity, since form rules are NOT database permissions; and QB doesn't currently support field level (conditional) user permissions.

The basic idea is to write a formula in your table that contains users; that resolves to the value of 1 if it's the current user's record and 0 if its not. THEN you can summarize that value up to your companies table, and pass it over to any child tables as a lookup. THEN you can use this field to control hide/show form rules.

I hope that makes sense!

Charlie