Link a duplicated page in a table

Hi there!

I’m trying to create a button that duplicates a page, and adds a link to that page in a separate table. I’m at my wits and about how I can make the button grab the link to the new page.

The intention is for the button to:

  1. Duplicate a template page called “Project Template”
  2. Add a row to the table called “Project Overview”, with the link to the newly created page.

Any ideas?

:wave: Hey there!

You can definitely do this with the AddRow() action inside of a button.

The AddRow() action has 3 different main parameters it takes:

  • The table you want to add your row to
  • The column Name you want to populate
  • The ColumnValue, or the value you will populate that column with

For the third parameter - populate the column value with the duplicatePage() action. Like this!

Let me know if it helps!

3 Likes

hi @Scott_Collier-Weir , I just tried to follow this logic while using the step logica provided by Coda, but the function DuplicatePage() did not show up. Only when you move to the formula editor you have access to this function, see below. That is a bit strange, isn’t it?

anyway, once you know this, it works as expected
cheers, christiaan

2 Likes

True,

Action formulas are only available inside buttons. My guess is that we intutively think that the value-setting in the dialog you showed above is inside a button, Coda is not recognizing it as such.

So yes, one will need to open the formula editor of the button and write the whole formula as opposed to using the drop-down options for the button

Good call out @Christiaan_Huizer !

3 Likes

Thank you! This worked like a charm! :smiley:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.