Use one User-list as the choices for another User-list drop-down

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I have a user-list in my Customer table which I use to allow users access to see Customers that they are associated with. I use two user-lists to achieve this (one for external customer users and one for internal users). This works well.

I now would like to use an approval process such as that defined here:

http://www.quickbase.com/quickbase-blog/how-to-keep-track-of-approvals-using-quickbase


For each record that needs to be approved there would be a manual choice by the person creating the record as they pick the users that need to approve. However, I would prefer to restrict the users which show up in that drop-down to the users which are associated with that customer (rather than show every user of the app, of which there may ultimately be hundreds). 

User-list fields seem to only have two options for how the choices are populated.

Either a) Default user set or b) Custom user set.

In other field types (multiple choice fields) you can reference another field as the source of the options shown.

How can I achieve something similar but with user-lists?
Photo of David

David

  • 20 Points

Posted 2 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 62,316 Points 50k badge 2x thumb
Rather than using just a User field, you will need to set up a table of Users.  Then you can have the selection of the Record Approver to be chosen from that list.  The User list would have a relationship to the Company, i.e. One Company will have Many Users.

Then when you go to choose the User from the drop down, you will edit the field properties to make the field a conditional drop down based in the [Related Company] of the record.
Photo of David

David

  • 20 Points
Hmmm... I potentially need to have multiple approvers for each record (and many approvers would be approvers of many different records) which would mean a many-to-many relationship. Any guidance on a good way to structure the approval process?

Is the method documented in the link above a good one or is it just a one trick pony around identifying outstanding approvals?

Also, I currently have a Formula-Checkbox which is used to restrict access (as per the first paragraph of my original post). Can I replicate this with the structure you proposed?

Field name: Current User is Member of Customer
Field type: Formula-Checkbox
Formula:
Includes([AVMI Userlist], ToUserList([Current User])) or Includes([Customer Userlist], ToUserList([Current User]))
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,316 Points 50k badge 2x thumb
How many approvers might you need to for each record?  Can they just be slotted into  field for approver 1, approver 2, approver 3.  Then you just replicate the relationships 3 times.