Forum Discussion
MarkShnier__You
2 years agoQrew Legend
One choice would be to mark the userid field as being unique. Make a Connected sink table of your employee table but after you make the sink table, set the key for you have to be the user ID field.
Then you can easily make that the parent of your child records based off n the Record Owner, and look up any fields you need, like dept.
That should work fine unless an employee user ID changes, for example, perhaps someone gets married or unmarried and has a name change. If you set the Sync table to add but don't delete records, then you can simply delete all the records and sync again.
A completely different approach is just simply use a pipeline that will trigger when a record is being added to then then search the table of employees looking for a match on the user ID and then update the department that way. The only problem is if the employee changes their department, then the records would not automatically be updated and you would have to build another pipeline to detect that situation.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Then you can easily make that the parent of your child records based off n the Record Owner, and look up any fields you need, like dept.
That should work fine unless an employee user ID changes, for example, perhaps someone gets married or unmarried and has a name change. If you set the Sync table to add but don't delete records, then you can simply delete all the records and sync again.
A completely different approach is just simply use a pipeline that will trigger when a record is being added to then then search the table of employees looking for a match on the user ID and then update the department that way. The only problem is if the employee changes their department, then the records would not automatically be updated and you would have to build another pipeline to detect that situation.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------