New To Packs Question About Sync Tables

I’m new to packs and have been reviewing the documentation but have a few questions about sync tables.

  1. Can I add to/extend a sync table when it’s created via pack code?

    For example, let’s say I sync recipes from a site called recipes.com but I want to append columns to the Recipes sync table like Calorie Count, Health Rating, etc. The newly appended columns would be blank/null initially so an end user can modify the appended columns later. The functionality is essentially how CrossDocs presently work in Coda.

  2. Is it possible to create a pack that appends the above mentioned columns to a table that already exists in a doc?

For example, let’s say I already have an existing Recipes table (not a sync table) in my doc. Then I create a pack that when dragged into the doc appends the aforementioned columns to the Recipes table.

I believe this isn’t presently possible based on another community thread but I’m not sure so I thought I’d ask to confirm.

  1. Assuming #2 isn’t possible, can my pack reference/lookup an existing doc table?

The example would be a pack that creates a Health Rating table with the previously mentioned columns but also references/lookup the display column in my existing Recipes table and appending it to Health Rating table with a chip.

Hi @Mike_Ray - Excited to hear you are exploring Pack building! To answers your questions:

Yes! Cross-doc is also a Pack under the hood, so the behavior is the same for all Packs. You can sync in a bunch of columns, and then add your own columns of local data that aren’t part of the sync, but stay attached to the same row.

Yes and no. Sync tables are distinct tables, and can’t be squished on to existing tables. You can however solve this in another way, using custom column formats in a Pack. The column format can take in some key (ID, URL, name, whatever) and then load that single item. You can then expand out that item into additional “projected” columns.

For example, here’s a wish list (regular table) that uses a Wikipedia column format to load in additional data from the Wikipedia Pack:

Packs don’t know what other tables are in your doc, so they can’t directly reference them. You can however add new columns to the sync table and setup those references after the fact.

2 Likes