QuickBase lets you add a button to your application that users can click to copy or import records and the relationships between them. Use the Copy Master and Detail Records option to add a Formula- URL field that displays as a button in a specified table that either:
Copies a master record and its detail records. For example, add a copy button in a project management application so that users can create a new Project by copying an existing Project master record and its detail Task records. (Read how to create a copy button.)
Imports specific detail records to a master record. For example, add an import button so that users can import the same group of detail Task records to different Project master records. (Read how to create an import button.)
When you create a copy or import button, you specify the master table in which the new Formula -URL field appears, and decide whether all or a subset of detail records are copied, and whether QuickBase should recursively copy all detail records. You also specify the text that appears on the button; make sure you use descriptive text so that users understand what will happen when they click the button.
The Copy Master and Detail Records option is available through the Customize > Application > Management tab and the Help > Application Site Map > Miscellaneous section.
Creating a copy or import button involves:
Understanding how application users will use the copy or import button
Understanding the limitations and restrictions for copying and importing records
How QuickBase maps predecessor relationships when it copies or imports records
Adding the copy or import button to reports and additional forms
Ensuring application users can use the copy or import button
Before you create a copy or import button, it's helpful to understand how the button appears on your forms and what happens when a user clicks it.
This section contains examples for:
In this example, a copy button has been added to a Project form, shown
below.

Here is a form for the Deploy Document Management project before the
user clicks the Copy this Project
button:

When a user clicks the Copy this Project
button, a confirmation message opens, indicating how many records were
created. The user clicks Go to Project
on the confirmation message, and the form for the new Project record opens,
shown below. The Project Name is "Copy of Deploy Document Management
system" and the copied detail records have the
icon.

top
In this example, an import button has been added to a Project form,
shown below.

Here is the T3 install project's Tasks list before the user clicks the
Import detail records button:

When a user clicks the Import detail
records button, a confirmation message opens, indicating how many
records were created. The user clicks Go
to Project on the confirmation
message, and can see that the T3 project's Tasks list now contains seven
imported Task detail records, indicated with the
icon, shown below.

You should understand the following limitations and restrictions before creating a copy or import button:
An application user must have these permissions to use the button successfully:
For copying records, create permission for both the master and detail records
For importing records, create permissions for the detail records
The master table must contain a report link field as part of
the relationship with each detail table. If the report link field
does not exist for a relationship with a detail table, detail records
for that table are not copied. The application user must have
permission to view the report link fields.
To confirm that the report link field exists, view the relationship
and check that the master table has a report link field whose target
field is the reference field listed under the detail table.
QuickBase will not copy or import any records if any of the records to be copied or imported contain unique fields, such as custom key fields. The key field for each table from which records will be copied or imported must be Record ID.
QuickBase copies or imports all fields in selected records, regardless of the fields' permission and Auto-Fill settings. (When Auto-Fill is enabled, a field's value is copied when a user clicks the "Add Similar" button to add a new Project.)
QuickBase does not copy or import file attachments.
QuickBase copies or imports up to ten levels of detail records.
If you try to copy more than ten levels, QuickBase won't copy
any records.
If you have more than ten levels, you can use the Advanced
Options settings in Copy Master
and Detail Records to specify which relationships to copy or
import and disable recursion, reducing the number of levels copied.
QuickBase will not copy or import any records if it detects
looping relationships. Loops occur when tables have reciprocal relationships.
Because conditional reference fields can be configured with
looping relationships, the API will not copy detail records from any
relationship where the report link field points to a conditional reference
field. (Read more about conditional
reference fields.)
The image below illustrates a looping relationship; the application
contains three tables (Countries, Employees, and Cities), and has
three one-to-many relationships linking each table to the other two
tables:

If you receive a looping error, you can use the Advanced
Options settings in Copy Master
and Detail Records to specify which relationships to copy or
import and disable recursion, reducing the number of levels copied.
After adding the copy or edit button to forms, you must edit those forms so that the button displays when the form is used only for "view". Make this change in the Form Builder. In the table bar on any application page, click the table whose form you want to edit. Within the menu that appears, select Customize --tablename-- table > Forms. Click the form name to access the form layout, then select the field for the button. Select view from the Display when this form is used for: dropdown, then click Save. (Read more about editing forms.)
Records in QuickBase may have predecessor relationships. For example, tasks in a project usually occur in a specific order and one task cannot start until another task finishes. This means that one task depends on another one. A predecessor task is a task that must finish before another task can begin. When you specify a predecessor for a task, you set up a dependency between two tasks (which is why predecessors are sometimes also called dependencies). A successor task is a task that cannot start until another task finishes. (Read more about predecessors.)
If a detail record contains a predecessor field, QuickBase attempts to map predecessors as follows:
If the original detail records map to each other as predecessors, QuickBase duplicates this predecessor relationship when the records are copied.
If the original detail records map to predecessors that belong to a different master record, QuickBase cannot map the predecessor relationship because there is no corresponding copy of those detail records.
If the original detail record maps to predecessor records that fall into both of these categories, QuickBase maps those predecessors that it can.
Consider this example of copying master and detail records in a Project Management application, illustrated below. A user copies a master Project record, called "Software Release", with detail Task records 1, 2, 3, 4. The new master record is called "Copy of Software Release" and has detail records 101, 102, 103, 104. The application has another master Project record, called "Product Review", with detail Task records 11 and 12. QuickBase maps predecessor relationships as follows:
2 has predecessor 1 and 11. When the records are copied, QuickBase sets the predecessor field for record 102 to 101, and ignores predecessor 11.
3 has predecessor 12. When the records are copied, QuickBase leaves the predecessor field for record 103 blank.
4 has predecessor 3. When the records are copied, QuickBase
sets the predecessor field for record 104 to 103.
