Forum Discussion

UrsulaLl's avatar
UrsulaLl
Qrew Assistant Captain
8 years ago

Update formula checkbox based on role

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, "") 
    • UrsulaLl's avatar
      UrsulaLl
      Qrew Assistant Captain
      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. 
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    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)
    • UrsulaLl's avatar
      UrsulaLl
      Qrew Assistant Captain
      good idea. I will see if this is a possibility. If it takes too long, I will just use the API method.