How to Use Cross-Doc Actions

How to add or edit rows and push buttons in other docs.

Updated over a week ago

Cross-doc actions are only available in the Team and Enterprise tiers. So, if you are seeing an error message, double-check your account type. 

There are currently 4 Cross-doc actions available:

  1. Push Button

  2. Add Row

  3. Modify Row

  4. Delete Row

📣 Two-way sync is now available for select Packs, including Cross-doc. This allows you to make edits to the data in your sync table and have that reflected automatically in your source table. To learn more about two-way sync for Cross-doc, check out this article.


Initial setup

First, add the Cross-doc table you wish to use to perform actions.

By default, tables you drag in can only display data rather than perform actions. If you're the Doc Maker, you can change the permissions to allow for actions.

Here are the steps:

  1. Click Explore on the top right

  2. In the panel that opens, click Packs > Cross-doc > Settings

  1. Under shared accounts, you should see something labeled "Read-write access to <table name>". Click on this option.

  2. Change the drop-down from View data to Take actions and view data.


Push Button Action

The push button action allows you to push buttons in other docs from your current Coda doc. Here's how to configure this action:

  1. Add a button column

  2. In the actions list select Cross doc > Push Button

  3. Select the read-write account that matches the table 

  4. Enter the Row URL you wish to change, if it's in a table you can just use the formula =Row.RowURL to get the current rows URL.

  5. Click the dropdown list for Column and you should see a list of available buttons to push

  6. Push the button to test it. You should see a notification that says "1 External action performed"

If you are changing data, you'll see the changes come through once you sync the table again. Note, if you're pushing a button that would open a row view or open a URL that will not be reflected here.


Add Row Action

There are a few ways you could set up this action. Your setup depends on if you have a fixed type of data you want to add each time (like today's date and time for a timesheet table), or if you want to be able to manually input the data. Since manual inputs are a bit more complex, let's walk through them here: 

  1. Set up a new table below your Cross-doc table and add the matching columns you want to input

  2. Add a button to this table

  3. In the actions list select Cross doc > Add Row

  4. Select the read-write account that matches the table 

  5. Press the f icon next to action to change to formula mode. You should see Crossdoc::AddRow([Read-write access to X]) in the formula builder.

  6. Add a comma and then a link to the table in your source document. The easiest way to get this link is to click the "here" link in your cross doc table below the title.

  7. Now we need to map the columns from this table to your original table. Do this by typing the name of the column you want to update in quotes (e.g. "Column1")

  8. Then add a reference to the column in this table that had the updated value. It should look like a colored reference to the column.

  9. For more columns keep alternating this pattern of the target column name in quotes and then the reference to the current table (all comma separated). The formula help text should make it clear what goes where.

You're all set! To test your action, click the button and you should see the notification "1 external action performed". 


Modify Row Action

You might want your cross doc action button to modify rows elsewhere. If that's the case, you'll choose this action.

📣 Two-way sync is now available for select Packs, including Cross-doc. This allows you to make edits to the data in your sync table and have that reflected automatically in your source table. To learn more about two-way sync for Cross-doc, check out this article.

  1. Add a column for each column you wish to edit. Think of one of them as the output column for the ones already in your Cross-doc table, and this new column as the input column to modify the data.

  2. Add a button column

  3. In the actions list select Cross doc > Modify Row

  4. Select the read-write account that matches the table 

  5. Enter the Row URL you wish to change, if it's in a table you can just use the formula =Row.RowURL to get the current rows URL.

  6. Press the f icon next to action to change to formula mode. You should see Crossdoc::ModifyRow([Read-write access to X],Row.RowUrl) in the formula builder.

  7. Now we need to map the columns from this table to your original table. Do this by typing the name of the column you want to update in quotes eg "Column1".

  8. Then add a reference to the column in this table that had the updated value. It should look like a colored reference to the column.

  9. For more columns keep alternating this pattern of the target column name in quotes and then the reference to the current table (all comma separated). The formula help text should make it clear what goes where

Now you're all set. Hit the button and you should see the notification "1 external action performed". 


Delete Row Action

If you want your cross doc action button to delete rows in other Coda docs, you'll choose this option.

  1. Add a column for each column you wish to edit. Think of one of them as the output column for the ones already in your Cross-doc table, and this new column as the input column to delete the data.

  2. Add a button column

  3. In the actions list select Cross doc > Delete Row

  4. Select the read-write account that matches the table (you should have changed the permissions for this earlier)

  5. Enter the Row URL you wish to delete, if it's in a table you can just use the formula =Row.RowURL to get the current rows URL.

Now you're all set. Hit the button and you should see the notification "1 external action performed". The next time you sync, the row will disappear.



Common Cross-doc Actions Errors

Error Type

Error Message

Description

Fix

Billing

Your monthly quota of cross-doc actions has been exceeded.

Cross-doc actions are for Team plans or higher. Attempting to perform cross-doc actions on a doc without a Team plan or higher will result in this error.

If you belong to a workspace that has a Team or Enterprise plan, try checking what folder your doc is in. If you’re in a Free or Pro tier workspace, you’ll either need to upgrade or move the doc to the correct workspace.

Formula

Doc does not exist or is inaccessible.

To fix this issue, check your Shared account connection in your Cross-Doc settings. The account connection should have both read and write access to the source table. Every now and again, connections may break. You’ll need to set up a new one

This error can also occur when your row or table URL is incorrect. For instance, using the Url() formula (e.g. Row.Url()) instead of Row.rowUrl will result in an error. Likewise, when adding restriction links, use a specific table link (ending in _t#tableID). If the restriction link for a cross-doc table is missing the table ID, the sync attempt will give this error.

Update the Url to your sync table. For AddRow() and similar formulas, you’ll want to click into the source table’s header and then grab the table URL from your address bar.

For ModifyRow() and related functions, you’ll want to use the Row.rowUrl output instead.

Formula

Could not find the referenced row within the doc.

If using ModifyRows or AddorModifyRows, check the rowUrl input in your formula.

A prior bug using WithName() used to cause this issue. If you find that removing WithName from your formula does the trick, please contact our support team via chat or by email at support@coda.io to report the resurfacing of this issue.

Formula

An unknown error occurred

An error in your cross-doc actions formula usually causes this error. Check the columns that you are editing and make sure they can be modified.

Make sure you’re not attempting to write to a column that is already being set to a formula or the Sync column in your cross-doc sync table (not set by a formula, perse, but by the pack itself).

Permissions

This account has not been configured to allow for actions in Cross-doc.

This error occurs when you attempt to set up Cross-Doc actions without updating your Shared account permissions to both Take actions and view data in your source doc.

Go to Explore > Packs & import > Cross-doc > Settings

Under Shared Accounts, change the pack permissions from View data to Take actions and view data.

Permissions

Automation Bot does not have access to Cross-doc. Update your action to use a shared connection or alternatively, configure your rule to take actions as you.

This is similar to the error message “This account has not been configured to allow for actions in Cross-doc.”

Make sure to update the take actions from Automation Bot to take actions as yourself.

Did this answer your question?