In case you missed: 2-way Cross-Doc is here (sorta)

In case you didn’t notice it yourself, Coda cross-doc already supports adding, modifying, and deleting rows in other docs.

This isn’t hidden functionality: it’s in the formula editor hints as well as the docs. However it seems it’s not quite ready for release too: the UI for setting this up without a formula is still incomplete, and the docs leave quite a lot for you to figure out on your own. Hence this topic to clear things up.

Here’s how you add a row into a cross-doc table:

  1. First parameter is the connection. It should have write access to the table you’re going to write to.
  2. Second parameter is the table URL in format {doc URL}#_tu{table ID}. You can get it by e.g. taking a Row object of any row imported through Cross-doc from that table and removing the row ID part:
    image
  3. Next are column name/id and value pairs. It’s better to use column ID and not a name, because otherwise this will break if you change column name eventually. To get column ID first enable Developer Mode (https://coda.io/account -> Labs), then right-click on the column and you’ll see the Copy column ID option there:
    image

Same for ModifyRow and DeleteRow, only that you need to use Row URL (full Row.RowUrl from the row object), and to delete a row you don’t need to list the columns.

Gotchas:

  • It seems there’s a bug that won’t update the source table with the changes until you reload the tab with the source doc. @BenLee would you please log this for engineers to look into? Same happens sometimes with the data updated via API/Zapier too, so I think the problem exists on the API/messaging level.
  • I haven’t found the way to also trigger cross-doc table sync via an action (i.e. to pull the data after pushing the change). Right now you have to either do it manually or wait for the next auto sync.
8 Likes