You can 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.
To access the Copy Master and Detail Records option:
Open the application that you want to work with, click Settings, then click App management.
Click the Copy master & detail records link.
Creating a copy or import button involves:
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 this record button has been added to a form, shown
When a user clicks the Copy this record button, a confirmation message opens. The user clicks Go to record on the confirmation message, and the form for the new record opens, as shown below. The name of the new record is prefaced with "Copy of" and the copied detail records have the icon, if your app displays it.
In this example, an import button has been added to a Project form,
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 project's details list now contains seven
imported detail records.
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 details table. If the report link field does not exist for a relationship with a details 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 details 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 every field in selected records, regardless of the field's permission and Auto-Fill settings. (When Auto-Fill is enabled, a field's value is copied when a user clicks the Copy this record 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 a form, you must edit the form so that the button displays when the form is used only for "view". Access the form and click Customize this form to make this change. Select view from the Display when this form is used for: dropdown, then click Save. (Read more about using the Form Builder.)
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.
Did this page help?
© 1999-2021 Quickbase, Inc. All rights reserved. Legal Notices.