Discussions

Expand all | Collapse all

Automatically tie child to parent

  • 1.  Automatically tie child to parent

    Posted 03-18-2020 14:57
    I have two related tables. Parent: "Employee". Child: "Timesheet". The relationship works fine. The employee can pull up their employee record, hit the "Add Timesheet" button, and everything ties together beautifully.

    HOWEVER. That's not a user friendly process. 

    Hitting the "Add Timesheet" button from the home page would work. Except, they don't like having to actually select the parent record (despite it filtering the options down to just the employees record). 

    Is there a way to create a button on the home page that will create a new timesheet and automatically select/tie the new timesheet record back to that user's employee record?

    ------------------------------
    Tine Ryming
    ------------------------------


  • 2.  RE: Automatically tie child to parent

    Posted 03-18-2020 15:14
    Do all of your employees have user accounts?
    Do your users have a need to be able to add timesheets for other users/employees? 


    ------------------------------
    Brad Lemke
    ------------------------------



  • 3.  RE: Automatically tie child to parent

    Posted 03-18-2020 15:45
    The best way here for the regular staff is to have a short (1 record report) of a list of employees where the Userid is equal to the current user.  The EE will see a single record and launch off that.  If you like that report can just have the Add Timesheet button - it does not even have to include their name on the report.  So it will be a report but will pretty much look like a button.  Also on the report, take away the option to view or edit.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 4.  RE: Automatically tie child to parent

    Posted 03-18-2020 16:24
    Yes, they all have user accounts
    No, only for themselves

    ------------------------------
    Tine Ryming
    ------------------------------



  • 5.  RE: Automatically tie child to parent

    Posted 03-18-2020 17:07
    Brad,

    This is a very common problem.  I solve it with Juiced Triggers 

    https://www.juicedtech.com/triggers

    However I suspect that the new Pipelines will have the ability to do this as well.

    1. In the Timesheet table add a field to convert the [Record Owner] to an email address.
    2. In the Employee table add in a User field for that Employee.
    3. In the Employee table add a field to convert [User] to an email address.
    4. Create a Trigger that fires when a Timesheet record is added and the Related Employee is NULL
    5. Search the Employees table where the email address of the Timesheet Record is equal to the email address address of the Employee
    6. Capture the RID of the Employee
    7. Edit the Timesheet record setting the Related Employee =  RID Employee

    This is really simple with Juiced.  It will take you 10 minutes to solve.  I have to do this all the time where someone is creating a record but there is no way to know the RID of the Employee.  This happens for Timesheets, Fringe Benefits, PTO requests and on and on and on.

    Steps 4 to 7 should be doable with Pipelines if you can get it.  If not then call Keith at Juiced.  It is very reasonably priced and I literally have hundreds of their Triggers in every application.


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------