Best approach to a defaulted field based on the user

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
Based on who the user is, I would like to populated a field. I would like to populate it with another user. The use case is that specific employees correspond with specific administrators in the office. So, employees 1,2,3 correspond with admin A and employees 4,5,6 correspond with admin B. In my form the [Associated Admin] field is a drop down with the two admins. I would like this field to default based on who the user currently is.

So is this possible with dynamic form rules? Should I use a formula field instead? Is there another better approach and which is most sustainable in terms of moving people between admins or adding future employees to them or other admins in the future?
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb

Posted 1 year ago

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

QuickBaseCoach App Dev./Training, Champion

  • 52,786 Points 50k badge 2x thumb
I suggest a table of Users where the the key field is User.  In that field you would list their Admin as well in another field.

Then make a relationship where 1 employee list entry has many detail records, and lookup the Admin userid.

Then either you can default the Employee field on your detail records to the current user or you can use a form rule to populate it to the current user if its blank.
Photo of Jordan

Jordan

  • 1,574 Points 1k badge 2x thumb
I already had a built in a relationship to our "Team Members" table, so I took your advice and created a field for admin in it and am using the same look up to get their admin! Thank you!