Refresh calculations with a delay than can be defined

Here is a thread with some specific context.
In a nutshell:
Use case: show a nice preview of a file uploaded to coda and/or provide a “one-click” to download option
Problem: The default file preview in Coda is not a really nice UX (clicking on a file uploaded in a file type column down’s show a preview). In order to get the link to the file uploaded (to either provided an embedded preview or offer a one0click to download solution), one has to use some black magic tricks (the hidden _merge() function - see here ). Because the file uploaded needs to be scanned for viruses first (THANK YOU Coda!) the calculation unsing the _merge() does not happen when the link is ready because it already happened before the link was available.
Suggested solution: create a way to trigger a recalculation of a table after a certain delay, to account for the time it takes to scan and make a link available. The current working solution, suggested by Coda Black Magic Shaman @Paul_Danyliuk involves using a volatile function to keep the formula recalculating… Very clever but also has a significant impact on Doc performance?

2 Likes

fwiw, my workaround in this mood board build video was to add a manual button to process the uploaded image (so that a formula column can output either the uploaded image or a URL image.) Then I just train users to click it after upload (sometimes a few clicks).

Uploading Images with Button

2 Likes

ok, so basically you populate the URL column with a button that applies the formula, instead of having a column with a formula (and I noticed the button becomes inactive once it worked).
UX-wise, it relies on a user clicking as many times as necessary, which is less user-friendly than Paul Danilyuk’s use of a volatile function trick. I guess if one doesn’t need the immediacy of the URL being generated, aan automation clicking the button every hour would do the trick? @Eric_Koleda : would that button + automation be a better solution in terms of ensuring better doc performance?

2 Likes

That’s right - the button pushes to an Image column (URL) with a formula that looks to either the Image Upload or Image URL columns (if(thisRow.[Image Upload Link].IsNotBlank(),thisRow.[Image Upload Link],thisRow.[Image URL])

That way the image displays elsewhere regardless of the user uploading or pasting a URL.

And totally - an automation once an hour to click any unclicked buttons would clean up after anyone who forgot to manually click.

2 Likes

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