Forum Discussion
_anomDiebolt_
7 years agoQrew Elite
You want to use the method API_CopyMasterDetials which is documented here.
https://help.quickbase.com/api-guide/index.html#api_copymasterdetail.html
API_CopyMasterDeails copies related records in the identified tables in one fell swoop. Other than assigning appropriate values to the foreign key fields (eg [Related Parent]) it does not modify any other field values during the process. The method API_CopyMasterDeails is probably underutilized as it takes a little more planning to map out what tables are participating and how to set the parameters.
Another approach which is even more versatile is to use script with multiple API methods such as API_DoQuery, API_AddRecord, API_ImportFromCSV and additional logic in the script to initialize, increment or otherwise calculate values for some of the fields being created. If you want counters, periodic dates, "one of each item in a list" or other calculated fields this is the method to use.
https://help.quickbase.com/api-guide/index.html#api_copymasterdetail.html
API_CopyMasterDeails copies related records in the identified tables in one fell swoop. Other than assigning appropriate values to the foreign key fields (eg [Related Parent]) it does not modify any other field values during the process. The method API_CopyMasterDeails is probably underutilized as it takes a little more planning to map out what tables are participating and how to set the parameters.
Another approach which is even more versatile is to use script with multiple API methods such as API_DoQuery, API_AddRecord, API_ImportFromCSV and additional logic in the script to initialize, increment or otherwise calculate values for some of the fields being created. If you want counters, periodic dates, "one of each item in a list" or other calculated fields this is the method to use.