Discussions

Expand all | Collapse all

Can a relationship field be populated based off of the current user rather than using a dropdown to select?

  • 1.  Can a relationship field be populated based off of the current user rather than using a dropdown to select?

    Posted 11-25-2017 22:50
    I have a relationship where one employee has many overtimes. When an employee is signing up for overtime, I have a drop down that lists the users from the employee table. Each employee has a quickbase user field that is linked to them. I want the drop down list to auto select the current user filling in the rest of the relationship fields.


  • 2.  RE: Can a relationship field be populated based off of the current user rather than using a dropdown to select?

    Posted 11-25-2017 23:52
    The ideal way to do this is to change the key field of the Employees table to be the Userid field. Then, when records are being created in the overtime request table, there will be an option to default it to �current user�


  • 3.  RE: Can a relationship field be populated based off of the current user rather than using a dropdown to select?

    Posted 11-26-2017 01:08
    Would I do that in the main table "Employee"? I have a separate table where they are creating records that has a relationship of "Employee has many records"

    Also, I seem to get errors when trying to convert the field to Key. If needed, Ill get the text of the error.

    Thanks for the help!

    Marc


  • 4.  RE: Can a relationship field be populated based off of the current user rather than using a dropdown to select?

    Posted 11-26-2017 01:12
    I suggest that you make a copy of the app to practice on. 

    Let me know what the error is.  Likely, not all of your employees have a Quick Base userid.  To use that method each Employee needs to have a userid


  • 5.  RE: Can a relationship field be populated based off of the current user rather than using a dropdown to select?

    Posted 11-26-2017 01:28
    I copied the application and then removed all of my employees that do not currently have quickbase username. That seemed to do the trick with the Key field and then that also allowed me to set the default as current user. Eventually all employees will have a quickbase username so that should work. Thanks!