URL from CopyDoc

Hey Coda community!

When I create a copy of a doc using a button formula CopyDoc(“New Doc”, “https://coda.io/d/DOC_NAME”), is there a way to retrieve the URL of the NEW doc that was just created?

The use case here being creating a project doc from a client row in a table and linking the client to the new doc.

Thanks!

Much simpler than I realized:

ModifyRows(thisRow, [Table 2].[Copied doc], CopyDoc(thisRow.Name,“https://coda.io/d/DOC_LINK”))

FWIW, it isn’t clear what the output of the CopyDoc function is, apart from a new doc.

From the documentation:

CopyDoc(title, url)

Copy a document to your document list

CopyDoc()
An action which when triggered will copy this document.

CopyDoc('newTitle')
An action which when triggered will copy this document, and rename it ‘newTitle’

OPTIONAL INPUTS

title
The title of the new doc (optional).

url
The url of the doc to copy (optional)

OUTPUT

Outputs an action which (when run) will copy this or another document.

2 Likes

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