QuickBase9
6 years agoQrew Cadet
Re: Copy Child Records from User Selected Parent
Thanks for the location Sharon! This is actually an action that cannot be completed by the provided wizard alone. With Mark's help I was able to get this completed, and will include the specific instructions here. I've also run into another issue with this wizard, that perhaps someone can provide the code/solution to fix.
Instructions:
1. Use the wizard to create a button that copies the parent and specific children you would like. Use a single record in the parent table (doesn't matter which one).
2. Create a relationship between the parent and itself. Then put the Related Parent drop down on your regular parent form. Your users will use this field to select which parent they would like to copy the related child records from.
3. Edit the code in the button that the wizard created. Where it says source=, that is the number of the record you chose in the wizard. To make this dynamic, change that number to your Related Parent field. Here is what it will look like:
"javascript:void(copyMasterDetailButtonHandler('&relfids=35\n&sourceRID=" & [Related Parent] & "\n&destrid=" & [Record ID#] & "',...
It seems that when going through the wizard the Copy Detail records (in the children of children) does not follow the field rules that specify "Do not copy this field when creating a copy of the task" - I've set up automations to clear out some fields, but I'm in real bind with a logged text field. It cannot contain the data from the copied task and I'm not sure how to force that since those logs are not editable. I'm hoping there is a snippet of code I can include in this button to only copy over some fields, or specifically remove this field from being copied. Or another action that can remove this text on newly created records. Anyone know?!?!
------------------------------
Leanne Snoeck
------------------------------
Instructions:
1. Use the wizard to create a button that copies the parent and specific children you would like. Use a single record in the parent table (doesn't matter which one).
2. Create a relationship between the parent and itself. Then put the Related Parent drop down on your regular parent form. Your users will use this field to select which parent they would like to copy the related child records from.
3. Edit the code in the button that the wizard created. Where it says source=, that is the number of the record you chose in the wizard. To make this dynamic, change that number to your Related Parent field. Here is what it will look like:
"javascript:void(copyMasterDetailButtonHandler('&relfids=35\n&sourceRID=" & [Related Parent] & "\n&destrid=" & [Record ID#] & "',...
It seems that when going through the wizard the Copy Detail records (in the children of children) does not follow the field rules that specify "Do not copy this field when creating a copy of the task" - I've set up automations to clear out some fields, but I'm in real bind with a logged text field. It cannot contain the data from the copied task and I'm not sure how to force that since those logs are not editable. I'm hoping there is a snippet of code I can include in this button to only copy over some fields, or specifically remove this field from being copied. Or another action that can remove this text on newly created records. Anyone know?!?!
------------------------------
Leanne Snoeck
------------------------------