Our Knowledge Base covers a wide variety of technical topics, from the basic to the complex.
How do I copy a project and all its task records while maintaining the dependencies?
In the July 2011 release, we introduced a QuickBase feature called Copy Master and Detail Records. Use this feature to add a button to a master table that either copies the master record with its detail records, or imports a set of detail records into a different master record. QuickBase maintains relationships and dependencies when copying or importing the records. The Copy Master and Detail Records feature is available from the Customize > Application > Management tab. Read more about this option in the online help.
The wizard described below is also still available.
Using a special wizard, you can add this capability to any master table in your application, like your Projects table. The wizard inserts a "Copy" link or button within all of your Project records. When a user clicks the link, QuickBase copies the record and all related detail records along with it. You can set the feature up to copy a master record and its children or use it to copy a group of child records (like tasks and issues) from one existing master onto another.
CAUTION: You should not use this wizard if you’re copying a project and have configured conditional dropdowns on any of the project’s child (details) tables. In this case, QuickBase adds a new detail record back to the original project (parent) table when you perform the copy.
NOTE: This wizard works with application tokens (read more at https://www.quickbase.com/help/app_tokens_wizards.html). If you want to use Application Tokens with this wizard add the following token to your application: bqipbngdfsd6drc64a958wz4aua (read how at https://www.quickbase.com/help/app_tokens_wizards.html) If not, you can leave the application's token requirement set to disabled.
TIP: If you'll be creating the same kind of project over and over again, you may want to create a Template Project to copy each time. Doing so saves you the trouble of editing out irrelevant information left over from the original project. To make a template, create a Project then add and relate tasks to it, entering the basic information you want a new project to start with. You should create the template BEFORE running the wizard, because the wizard lets you set it as the default choice. Later, you may not want this template project showing up in views, so add a checkbox field named Template to the Projects and Tasks tables. Then edit views to exclude any record in which you've turned on this checkbox.
1. Click on the link below to start the wizard.
2. Within the dropdown list that appears, select the master table (like Projects, for example).
3. Tell QuickBase how you want the button to behave.
The button can produce different results based on the selections you make in the remaining fields.
Where do you want the detail records to come from?
- The record that the button is on.
This makes the copy button duplicate records belonging to the master record from which 'copy' was launched.
- let me choose a record after I push the copy button.
Select this option to have the button click display a list of records from which a user can select the source master record.
- always the same currently existing record.
If you've created a template, choose this radio button and then select the template from the dropdown list. The button will always copy that template. If you have multiple templates, you can create a copy button for each one.
Where do you want the children records to end up?
- the record that the button is on.
Select this option and QuickBase copies detail records from the source (a template project, for example) and attaches them to the master record from which 'copy' was launched.
-let me choose a record after I push the button.
This option displays a list of existing master records. When the user chooses one, QuickBase attaches copies of the child records to it.
-a copy of the record that the button is on
This option goes with the first source option. Use it to copy an existing project and all its related tasks together to create a new complete set. If you select this option, the wizard asks you to specify the field you'll use to name the new copy. Choose a field like "Project Name."
What do you want users to see after they copy the records? Make a selection:
-continue to Display the page with the button
Users see no change. If they're in a view and click their browser's Refresh button, they may see the new records appear.
-refresh the page with the button on it
The browser refreshes. If the user's in a view that happens to take in the new records, they'll appear. If the user's in a display form of a single record, they won't see a change.
-the record that received the new children records.
Select this option and the newly created master record (or the master selected to receive copies of the child records) displays.
4. When you've made all your selections, click Create Copy Button. QuickBase displays a confirmation prompt to let you know the button's been added to the table you specified.
The Copy button this wizard creates is a formula URL field. Initially it displays as a link but you can change the field properties to display it as a button.
What you see when you click the copy button, depends upon the choices you made while creating it. QuickBase may prompt you to name the new copy of the master record or select a source master record. Once you've supplied all the info required, please be patient while the wizard copies all the records involved. The pop up window tells you when the copy operation is done. Click "OK" button to close it.
Do not place this button field on an add record or an edit record form. You'll get strange behavior that will confuse your users.
This technique will work with any master table. It is also a recursive copy, meaning it will also copy the detail and detail of detail records, etc.
If you don't want to grant all users the ability to copy, you can:
- Add the field to a form associated only with an administrator role. (see https://www.quickbase.com/help/about_custom_forms.html)
- Edit the roles in your application such that only a Manager can see the copy field. (see https://www.quickbase.com/help/changing_role_properties.html)
- Use Form rules to specify that QuickBase should show the field only if the viewer is in the Project Management role. (see https://www.quickbase.com/help/form_rules.html)
To access the Copy button wizard from a realm, you will need to adjust your browser settings to allow data to go across domains. The following KnowledgeBase article describes the steps.
Browse by Category
Knowledge Base Categories
- Accounts (35)
- Application (45)
- E-Mail (7)
- Fields (41)
- Forms (20)
- Formulas (18)
- General (69)
- Other Product (7)
- Pages (1)
- Product (5)
- Reports (15)
- Roles (4)
- Search (1)
- Tables (6)