Pro hack: Trigger cross-doc sync with an action (hidden formula)

are there are any problems you can’t solve @Paul_Danyliuk!! :slight_smile: that little nuance has bothered me as I like to give solutions to people and I know how difficult it is to parse/interpret when its new info and hard to read the run on sentence. Thanks again!

This isn’t a supported strategy and is strongly discouraged.

This may break at any time or your docs may have calculations turned off if they include this workaround.

2 Likes

Ben what would be the supported way of having a CrossDoc action sync the table? This is imperative to making a UX a Doc user can intuitively understand. Many times a user doesn’t know or have access to the table that would need to be synced after the CrossDoc action. Thanks!

There isn’t 2-way sync right now. We just don’t support it at the moment. Cross-doc is meant to pull in data on a particular cadence of hourly or daily. I’d work to design your schema around those parameters instead of trying to force a solution that can break.

I struggle with this response as crossdoc already feels like a quite poor solution to a fundamental weakness of Coda.

Serious users of Coda can have some fairly large datasets and many different users need access to some or all of that data but each set of users might operate in different Silos… imagine a large organisation that has sales teams needing access to thousands of clients and an accounts team also needing the same client data however they cannot share the same doc as they each have other private tables that cannot be exposed. The 10,000 row limit is already an issue, and waiting 1 hour for a sync is not practical for many systems.

In reality many Coda users probably dont want sync, they want live access to a shared table, but since they cannot have this, sync becomes a workaround.

There does not appear to be any schema that can overcome this.

2 Likes

I would say try not to read this as the only and permanent solution. Coda is a growing product, and part of what helps us grow as fast as we do is getting solutions out there, taking in feedback, iterating, and improving. After all, how can you build a great product for your customers if you don’t actually build it with your customers?

This isn’t something that can be solved overnight, but we do have our eye on things and the product will continue to improve.

Thank you for letting us know your use-case and needs.

4 Likes

I just tried this, but when the automation is triggered it gets flagged with an error that says “Syncing table from cross-doc failed due to an internal system error”. It triggers the Cross-doc sync in my table, but after the table starts syncing and it says “Loading Table from CrossDoc…” and never actually loads. It just gets stuck there. Any thoughts?

Maybe they disabled this finally. As Ben said above, this is a discouraged solution. I shared it because I found it to work at the moment, and was excited to share this hack. But it’s still a hack.

Ok, gotcha. I will keep my eye out for another option and see what happens. Thanks!

I am merely trying to Cross-doc in some tables from another doc.

The usecase is that my user will duplicate the Template doc, then click a button to sync the new doc with the source doc, then do some work. They never have to sync with the source doc again after this.

How do I do this? My solution right now is to ask my user to click the sync button for all 6 tables:

Hey Coda team!

Any updates on this with respect to 2-way edit syncs or forcing a sync through an action? It’s really really hard to use Cross-Doc right now at our org without a reliable sync solution baked in since we use automations to trigger Slack notifications based on changes in the referenced doc.

1 Like

Hi, is there any plan to put a smoother way to trigger cross-doc sync? It’s really blocking to have a one hour limit and not being able to trigger it via action. News on this!!

1 Like

Reviving this thread to tell that RefreshTable() is now a thing and it works!

image

(also RefreshColumn() for pack columns)

9 Likes

OMG :open_mouth: this is great! Thanks for the heads up @Paul_Danyliuk. It’s working fine here.

Nice! Now is there a way to get it to run sequentially?

I tried making a button like:

RunActions(
  RefreshTable(myCrossDocTable),
  myCrossDocTable.FormulaMap(... do more stuff ...)

But the do more stuff happens before the table is finished refreshing. I thought about putting in a _Delay() but then I’m worried that it won’t be consistent across different internet connections.

I thought RunActions was supposed to force said actions to run in sequence, but that doesn’t seem to happen in this case.

The RefreshTable() is not a blocking action — it merely means “send the signal to start the new sync”. But the formula goes to the next action right after that.

You’re right about consistency. The only way to set up an action to run after the sync is done is through automation: listen to the changes on the table and if any found, run whatever you need to run on that table. You cannot schedule new syncs that way though: RefreshTable() only works if it’s invoked by a user, not automation.

2 Likes

Oh, good to know the warning about needing a user to trigger the Refresh. Alright, I’ll use automation to properly sequence my actions.