Dynamically fill DuplicatePage variables by looking them up in a table

Hi,

Hopefully somebody can help me figuring out how to do the following.

I want to dynamically fill the DuplicatePage action variables based on rows in a table.

Source Table:

I want to use a dropdown and button to create a subpage based on the template defined in the table.

I have used the following action formula for the button:

DuplicatePage(
Filter([Meeting Type Templates],[Type of meeting]=[Meeting Select] ).[Document Template],
name: WeekdayName([Meeting date])+ ", "+ ToText([Meeting date]),
parentPage: Filter([Meeting Type Templates],[Type of meeting]=[Meeting Select] ).[Parent Page]
)

I’ve also tried this with a LookUp but I keep getting an error which I can’t figure out how to resolve

Wrong argument type
DuplicatePage expects parameter page to be a canvas, but found [Meeting Type Templates].Filter(,[Type of meeting]=[Type of Meeting Switch 2] ).[Document Template], which can match a column, or a list of text values

So what do I need to do for the DuplicatePage action to accept the dynamic variables?

Any help would be much appreciated :smiley:

Cheers, Ruben

2 Likes

Looking to do something very similar. I create a document from a template page and place it into the table and finalize it. Once finalized, QA requires a new document revision vs a change to the original. I can point my button to the document link in the table however I get a:

DuplicatePage expects parameter page to be a canvas, but found value (‘MEMO-Test-1-r0_suy4P’), which is a text value

Error

The part in parenthesis is the end of the page link: Coda | A new doc for teams.

However I am not sure what the format should be for a Canvas to properly link it from the table