Forum Discussion

PaulEaston's avatar
PaulEaston
Qrew Assistant Captain
2 years ago

User field: can I limit choices to users of a specific Role?

Is there any way to have the users shown in a user field limited to users of a specific role?

Use case:

The app has a role called "approvers"

In a form, I want a "Select Approver" field that would be a "user" type field. The selected user would get a notification.

I know I can make a "custom user set", but every time an approver needs to be added or removed, an admin would have to go in and edit the field. This information is already in the app per the role. It would be much better to simply have a field that allows you to select from this list of users with the approver role. 

Is there any way to accomplish this?

------------------------------
Paul Easton
------------------------------

4 Replies

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    The answer is basically no.  I suggest you create a table of users where the key field is user and use that as your pick list using a relationship. You can add fields as required to identify attributes of these special users for example if they are approvers.

    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------
    • PaulEaston's avatar
      PaulEaston
      Qrew Assistant Captain
      Thank you for clarifiying. 

      But is there any benefit of creating a new "users" table and editing that versus adding/removing the users to/from a custom of a user set in a user field? 

      It seems that the benefit of using a user field is it makes sending notifications easier. If the users are selected from another table, it gets more complicated to have the user notified.  I would have to tie the notification to the intermediary users table.  That would make it difficult to, for example, add a button in the e‑mail that will update the record in the table I want.

      ------------------------------
      Paul Easton
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew #1 Challenger
        One benefit to having a table of users is that you can control easily who is allowed to maintain the table and it is visible appropriately to your users. The custom user sent is only available to admin's.  Also, you may want to use the same drop down list of users in several tables in the app and not have to adjust the custom user set multiple times and several tables.

        There's absolutely no problem having the relationship pull in the user ID in fact I suggest for other purposes that the key field of that table be the user ID so there's absolutely no difference with notifications or subscriptions.

        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------