Button in Canvas Template to update the row column values

I’d like all rows canvas column come from a template so they’re all the same. That template I’d like to have a button, then when clicked will change the value of a column for the row that canvas is for.

For example. There’s a button in the canvas column that when clicked will change the rows Status to “Complete”. How do I create the canvas template for that? Here’s an example doc with the setup.

Hi Ryan,

I hopped in your example doc and made a few changes. Take a look and tell me if that’s your desired functionality.

What I did:

  • Made the template a row in the present table, rather than a separate one
  • Created another column called “Is Template?” with a checkbox to mark templates vs non-templates
  • Hid both that new column and all rows with “Is Template?” checked true
  • Set it so new rows canvas columns are created as copies of this template column
  • Put a button in that template column using the formula ModifyRows(thisrow, status, “Complete”)

Thanks Billy. Is there anyway to create the template in another table? I’ve seen some Canvas template examples from the Coda team that create their templates in another table and using features like parentRow, although I haven’t seen one with a buttons yet.

Hi Ryan,

It’s certainly possible, but I think (someone correct me if I’m wrong) would involve some fussy workarounds in order to reference columns indirectly. Which is to say: it’s doable, but the downsides would be 1) more difficult adjustment, 2) more difficult maintenance, and 3) worse performance.

I would ask your motivation behind creating another non-connected table to hold the templates, and whether the juice is truly worth the squeeze. In my experience, keeping things in one table and filtering views is almost always the better solution, except when the tables are representing truly distinct entities.

Another thought: Would it maybe be easier to just create a button column in the original table that changes the value of the status?

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