Launched: Duplicate Page Action

When we launched our “Copy Doc” button last summer, the very first request was to enable a button to duplicate pages as well. After some hard work and a lot of testing, we’re excited to share our Duplicate Page action with you today, which lets you create copies of pages within a doc with the click of a button!

Duplicate Page.gif|755.5555555555555x425

To create a button that duplicates pages, simply type /duplicate anywhere on your page to select the button, or select the “Duplicate page” type when adding a button anywhere in Codaーeven in tables. Note that your button does not have to be on the same page that you intend to duplicate, but that the page does have to live within the same doc.

When you configure your duplicate page buttons, you’ll have an opportunity to set your standard button settings like button name (for referencing in formulas, automations, etc.), label, disable logic, size, color, and icon. In addition, you can set:

  • Page: Which page should be duplicated?
  • New Page Name: If new copies should have a different name than the page title, set it here. You can use formulas as well
  • Location: Under which page should the new page be nested?
  • Include subpages: Toggle this on if you want to duplicate any subpages nested under the target page; toggle this off if you only want to duplicate the single page itself
  • Tables & views: If your page has tables, you can select:
    • Create connected views: This means any edits to tables in duplicated pages will sync with the original page and any other linked views of those tables ー great for making multiple pages that have a table that might roll-up into a top-level dashboard on some other page
    • Duplicate data: Any tables will be copied, but they will not be linked to other tables ー great for templates that you want collaborators to use without impacting any other data sets
    • Learn more about views and duplicate data in our help center

We know a lot of makers have made impressive instruction guides, tutorial videos, and more to guide their teams to hover their cursors over a page title and select “Duplicate.” Hopefully this removes some of that lift, and helps you and your teammates collaborate more seamlessly in one doc!

36 Likes

What happens if I need to duplicate some of the tables, but create connected views with other tables?

In particular: I want to automatically fill in a control (or a row of a table) when duplicating the row that will inform the page what date it refers to. After that, all subsequent tables in the page look at that control to see what rows to display.

I would use a lookup table, but changing the value in that source table will change all the views of that table. I need each page to have a different date.

How might I automatically (using a formula) set a date for a page that will only be changed manually?

E.g. I’d like to somehow automatically fill this control with the current date when a page is duplicated:
image

Hi Connor – great question. One idea I can suggest: If you only duplicate your meeting details template on the date of the meeting, you can consider using the Today() formula to save the date directly to the new page title (screenshot)

Very useful, but as far as I understand my page isn’t able to access the page name?

E.g. in the [Todos] table I cannot run the filter:

thisRow.[Due Date] <= pageName.ToDate()

Right?

Edit, found a really hacky way to get the title of a page if anyone’s interested. But we may still need a more robust way to add data to a page when creating a new page.

1 Like

Hi Conor

You are right in that there is no good way to add the data to a page that was created today. That said, you can accomplish what you have in mind by creating a control and creating a filter that uses that control.

Here is a doc that has the setup you will need

And here is a gif that shows this in action.

Thank you so much, Himanshu! That is exactly what I’m currently doing. But my users sometimes get a bit confused. I want them to click the [New Meeting] button and have everything just work™.

Here’s a writeup of that solution.

1 Like

This is a very useful feature, thank you for that. I was already using it for maybe 2 weeks or so? Somehow I found it already available :smiley:.
There are 2 issues with such a button.

  1. If you have a lot of pages it is very diffcult to to edit the properties of the button. It is very slow opening (I even get asked by the browser if I want to wait or kill the script). Once the property popup is open, switching from one input to another again takes very long.
    I have currently over 550 pages. I suspect the page selector. It would be nice if one could start typing and the dropdown gets populated accordingly.
  2. The page selector entries are not sorted and it seems hidden pages are not available. If you have as many pages as I do, finding the correct page is really hard this way.

Hi there, I am using the Duplicate Page function to make copies of a report template for a homework assignment that is repetitive except for information I pull from tables.

I am using Controls to pull all the relevant information from table into my text homework report.

When I duplicate the page, a new control is established on the new page- which is OK, but it is now set to a random source table and not the original. When I update the control reference table, the control breaks for all the places it is referenced within the duplicated page. I could manually update each reference, but that kind of defeats the purpose of having a template!

Why doe the Control go haywire when the page is duplicated? Is this a bug?
Thanks

Lorraine

Hey Lorraine! Interesting find here. From the looks of it, it does appear to be a bug. It’s been reporting to our eng team. Sorry for the headache, but thanks for notifying us :+1:

2 Likes

I’ve yet to figure out how to add a link to a page in a row and then use that link in the DuplicatePage formula.

For example:

DuplicatePage(thisRow.[Row Type].[Template Page Link])

Is that possible?

2 Likes

Another question:
How do I set the parent page to the top level? What’s the parent page of all parent pages called?

It turns out I can’t use thisDocument because it is a doc not a page.

1 Like

Second @Connor_McCormick’s question. I’d like to be able to use different templates depending on the row that I’m hitting the button from. I tried several things and couldn’t make this work :frowning:

Any time I tried to put a “page” through any kind of conditional logic (like if or switch) it angered things (and didn’t work). Additionally, I had to cheat a bit to get the references to pages to even work. I had to fill it out in the DuplicatePage([...], formula, and then copy paste it out. I get the sense there is special logic going on in the editor just for that field of DuplicatePage and the editor in general doesn’t want to be handling page references.