Update formula checkbox based on role

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
  • (Edited)
I need to check the role of a user adding or updating a record. If the user is in one of four roles, a checkbox needs to be checked the the record is saved. However, I am not able to find a Quickbase function to check the role of the user. I want to do this in a Formula Field, and not in the form rules, because it would need to be applied to multiple forms. I know that I can use the API_GetUserRole, however, I wanted to know if there was a native Quickbase option to check/find the user in a formula field. something like:
If(User is in Role = xx OR Role = yy, checkbox = true, "") 
Photo of Ursula Ll

Ursula Ll

  • 1,450 Points 1k badge 2x thumb

Posted 2 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 53,240 Points 50k badge 2x thumb
Dynamic form rules recognize Roles.  Can you use a form rule?
Photo of Ursula Ll

Ursula Ll

  • 1,450 Points 1k badge 2x thumb
I would rather not, since it would need to be applied to more than 10 forms, that would at some point need to be updated. 
(Edited)
Photo of Matthew Neil

Matthew Neil

  • 31,478 Points 20k badge 2x thumb
Another way to do this is to create a "User" table, separate from the default, and assign roles there.  
It will have a 'User' field on the table, that is also the key field.
Then you create a formula relationship between that table, and any other table you'd like, and pull the role as a lookup.  Then you can use roles in formula to direct workflow beyond what the native solutions provide.  (i.e. User Role specific forms)
Photo of Ursula Ll

Ursula Ll

  • 1,450 Points 1k badge 2x thumb
good idea. I will see if this is a possibility. If it takes too long, I will just use the API method.