Basically, I am creating new Specimen records from within a Collection, with a quick create form. The related Collection is here by default, since I am creating the Specimen under that Collection.
A Collection is related to one patient, and due to some complex record linking, I need a Specimen to be linked to that patient as well. I am trying to pre-populate the Related Patient field with the same Patient as the Collection, but I cannot figure out how to do this with Javascript. I have tried using an OnLoad event and grabbing the record from the "Related Collection" field, getting the Related Patient value, and then setting that value here, but cannot seem to get it to work. I am thinking that the OnLoad event occurs before the data on the form is populated and that is why it can't find a value.

Any suggestions would be appreciated. Let me know if I can provide any clarifying info.