Discussions

Expand all | Collapse all

Best approach to a defaulted field based on the user

  • 1.  Best approach to a defaulted field based on the user

    Posted 06-30-2017 12:51
    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?


  • 2.  RE: Best approach to a defaulted field based on the user

    Posted 06-30-2017 13:04
    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.


  • 3.  RE: Best approach to a defaulted field based on the user

    Posted 06-30-2017 13:32
    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!