Forum Discussion
MarkShnier__You
5 years agoQrew Legend
Yes, you can get this to work with an Automation.
Add a line to your code to populate a formula numeric field with the [Record ID#] of the source record in Application.
Create an Automation triggered by a record being Created and that field not be blank, and it will have two steps.
The first will be to populate a single field in a single record table which is called Application Focus. This is a table and field which exists with one and only one to retain the value for a moment of the [Record ID# of the Automation Focus Application].
You will set up a Relationship where one Application Focus has Many Application Children based on a formula numeric reference field called [Link to Automation Focus (=1)] with a formula of 1. The single record table will only have 1 Record so it will be Record ID of 1. Lookup the value of [Record ID# of the Automation Focus Application] down to all Application Children
Then the Step 2 of the Automation, after setting the Focus Application will be to copy all Application children to Employee Children where the [Related Application] equals the [Record ID# of the Automation Focus Application]. You will be sure to connect the children to the correct Employee by referring to the Record ID of the Trigger Record.
Post back if you get stuck. I have the working in a client application so I can look back if I missed any steps.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
Add a line to your code to populate a formula numeric field with the [Record ID#] of the source record in Application.
Create an Automation triggered by a record being Created and that field not be blank, and it will have two steps.
The first will be to populate a single field in a single record table which is called Application Focus. This is a table and field which exists with one and only one to retain the value for a moment of the [Record ID# of the Automation Focus Application].
You will set up a Relationship where one Application Focus has Many Application Children based on a formula numeric reference field called [Link to Automation Focus (=1)] with a formula of 1. The single record table will only have 1 Record so it will be Record ID of 1. Lookup the value of [Record ID# of the Automation Focus Application] down to all Application Children
Then the Step 2 of the Automation, after setting the Focus Application will be to copy all Application children to Employee Children where the [Related Application] equals the [Record ID# of the Automation Focus Application]. You will be sure to connect the children to the correct Employee by referring to the Record ID of the Trigger Record.
Post back if you get stuck. I have the working in a client application so I can look back if I missed any steps.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------
- ChristineWhite5 years agoQrew Assistant CaptainHi Mark,
Does the Focus Application (Record 1) have both the Application ID AND the new Employee ID? I am not seeing the connection between the child records and the new employee ID.
------------------------------
Christine White
------------------------------- MarkShnier__You5 years agoQrew LegendThe Trigger Record is the only place which knows Employee Record ID as it is determined when the Employee Record is saved. I believe that when you are setting the fields to copy from the Application Children to Employee Children, that there will be an option to get values from the Trigger Record. So you need the Record ID of the Trigger Record to populate into Related Employee so the Employee Children won't be orphans.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------- ChristineWhite5 years agoQrew Assistant CaptainHi Mark, Sorry, I am not seeing how the application child records are being added and then transferred from the temp Focus child table to the the Employee child table. Are you suggesting a duplicate table for application child records? Can I just include all of the fields needed for the employee child records in the Focus table itself? Thanks!
Focus Table:
Applicant ID
New Employee ID
Start Date (from Applicant) etc
Automation: When New Employee ID changes (since focus ID will always be 1) add new records to Employee child
Related Employee=Focus Table New Employee ID
Start Date=Focus Table
------------------------------
Christine White
------------------------------