A few advanced tips for canvas column type

Hi @Kelsey_Chan! Although the full screen view of the row is pretty usable, it still lacks of some page functionalities. Some small aesthetic things the team could take a look is this black bar up top when you add a cover for the row and the weird aligment of the “row from …” link on the top:

@Guilherme_Salles Thanks for the feedback! I’ll pass it along to the team :raised_hands:

2 Likes

Hi Kelsey,

Is it possible to convert a row to pdf?

This is a great addition. There are currently two drawbacks which when properly resolved will make this feature much more flexible.

parentRow is not available from template pages. For which there are currently two workarounds:

  • To embed the template in the same (or a different) table as @Kelsey_Chan suggested.

  • or to create a formula on your template page

    RandomInteger(0, 1000000)
    

    and call that formula PageId, then for any data you need from the parent row inside of your template you do a formula like this

     TheParentTable.Filter(TheCanvasColumn.Find(PageId) > -1).First().TheColumnValueYouNeed
    

    What is happening here is that we are emulating the parentRow formula by creating a random id for each canvas and then searching for a row that contains a canvas with that id within itself.

The first approach is simpler and more future proof if you don’t mind having additional columns and filtering out template data. The second approach lets you have template pages and reference parentRow but might break at some point, and also you need to hide the various formulas on the page.

Referencing data from child canvases is difficult. There are some interesting use cases where for example the status of the parentRow depends on the state of tasks in a table within a canvas cell (basically a formula row that says that the parent row is done only when all tasks in the canvas cell are done). This is difficult to do correctly as canvas cells can all be different so there is no way to guarantee that a canvas cell will even contain a table. Here is an idea for the future, and a workaround:

  • Allow select lists to be displayed as as inline tables. This guarantees that all the cells are the same and can be easily referenced from the parent row. There are some hacks to do this but they are complicated and unreliable. For additional “freeform” data it can simply be added to another canvas column, the data doesn’t necessarily have to be in the same column. Although this still leaves the problem of referencing controls or formulas within a canvas cell.

  • A workaround: in your template add a formula like this

    "<1>" + TheTableInTheTemplate.TheColumnYouWantToExposeToTheParentRow.Sum() + "</1>"

    (of course you can expose any kind of data you like, Sum() is just an example). Then in the parent table to get the exposed data you do something like this (either within a formula column, or another formula)

     WithName(thisRow.TheCanvasColumn.ToText(), CC, CC.Slice(CC.Find("<1>") + 3, CC.Find("</1>")-1))
    

    <1></1> are just unique placeholders (inspired by HTML) that are easy to search for, you can use any identifier you like, for example: |-some value we're exposing-|, but keep in mind these identifiers need to be different for each value we’re exposing so :<1>value 1</1> <2>value 2</2> etc..

I hope someone finds these workarounds helpful.

7 Likes

Hi, @swavalambhi_enterprises! Unfortunately at this time, we only support printing pages, so there’s no way to export a single row to PDF. I will forward your feedback along to the team.

3 Likes

thanks @Kelsey_Chan , proper printing & permission management throughout the doc (including the canvas column) would boost business usage. Also have a look at the remarks of @joost_mineur regarding the bread crumb logic in which tables are shown living in locked pages.. The work around via a view of a source table is a kind of dirty fix for this serious issue, cheers, Christiaan

2 Likes

Agree with better printing. I like printed reports to scan over throughout the day since I don’t sit at a computer for my job. Better print would be so nice.

1 Like

For referencing fields belonging to [parentRow] (or [thisRow]) within a canvas cell within a template table, another simple solution is to simply write the formula as text (or you can write it in one of the “real” table (eg meeting table) then copy-paste the formula into the template table. Coda automatically recognizes the formula chips once the template makes it into the destination table.



Of course the downside of this is if a column changes it’s name, the formula in the template will break. Plus the red underline feels wrong… but it’s a quick and easy hack.

3 Likes

It strikes me that there are three classes of scenarios where you might want to reference data from canvas cells:

  1. a repeated formula for every row
  2. a one-off formula in just one (or a few) canvas cells
  3. a repeated formula, but some exceptions where the formula is a bit different

For (1), I think 99% of the time it is best just to have that formula as a column formula, since it’s repeated for every row (and if the formula references a table, then that table should also be a column formula).

For (2), the formula should simply be a named formula and then referenced by name wherever that value is needed.

For (3)… this one is trickier, and here I think @Nikola_Lajic’s hack might come in handy. In many cases though, I think it would be worth it (simpler at least) to have an entire canvas column just for that one formula, and refraining from adding extra data in there. Con: fragile, requires user restraint.

2 Likes

I came for this as well. I’ve run into this issue several times and inability to print a row (as it appears when opened to fill screen) is a barrier to moving forward with my preferred implementation.

For context, I’m using canvas column as a policy template and want the user to be able to print.

Other print formatting options would be great too - anything that would easier export to a Google doc or similar.

1 Like

Thanks for these examples, @Kelsey_Chan, for those use cases, where we do not want a user to set the filter within the canvas cell themselves (ie where we want to auto-filter based on parentrow).

As I was working through the methodology of this, I created a step-by-step guide. I’m sharing the doc below, in case it’s helpful to others.

All the best from Austria,
Nina

11 Likes

it is a clever set up @Nina_Ledid , the creation of a page that is referenced in the canvas column in a kind of helper table permits for quite a bit of intelligent nesting since the filtering is activated on that level, you don’t have to set it right in and for each row you work in. I like that mechanism a lot. Designing and maintaining these solutions is a challenge in itself, proper documentation is key and you showed a great example of how to do that!

3 Likes

@Nina_Ledid,

well done indeed on two levels;

  • the trick itself is genius and so very useful!
  • you have explained how to do it - and how it works - so clearly

many thanks
max

4 Likes

Can we paste images into table cells using this?

This is exactly what I was looking for. My question (which very well could something else to tackle entirely), is there a way to populate a table within that Project template with a table of prefilled tasks?

What I’m attempting to do is create a new project that has a preset list of tasks that will have this filter function (the one you’ve demonstrated) applied. The point is to avoid having to re-enter (or copy/paste) the same tasks we use in every project. Essentially a filtered template of tasks in the template.

Absolutely, there is. Like with anything in Coda, there’s more than one route to achieve one’s goal :wink:

Personally, I’d do it like this:

  • Create a separate table, called “Tasks that need to be done for every new project” (abbreviated CommonTasks for the purpose of this post).
  • Set up an automation (or button, if you’d prefer), so that whenever you add a new project to the projects table, it will automatically add the rows of the table CommonTasks to the AllTasks table, while assigning the new project name to these tasks.
  • That way, they will show up in the filtered view in the canvas cell, where the filter is set to the parentrow (ie Project Name).

Hope this helps! Nina

4 Likes

@Nina_Ledid,

you hit the nail on the head
i use a similar pattern myself

just to add…

this works best using a BUTTON to add a new project as automations can lag a bit (i think they run on the server?)

so we have adopted a rule; always put an Add New Row button on every table and hide the little ‘+’ button below the table. that way we always have a place to put the logic for adding new customers, products, projects etc, etc.

and by doing this for every table, we train our users to use the button every time.

it also facilitates popping up a form-like dialog for them to input the required data.

and locking the page to prevent adding new rows means we are confident (ish) that nobody sneaks past this logic

max

1 Like

Yes! Nina and Max, that’s exactly what I’m looking for. However, being a bit new Coda’s buttons and automations, is there any guidance (explanation, article reference, video) that might help out. I’ve tried utilizing what I know about buttons and automations, but I’m missing something.

I’m currently using the method you described in Canvas cell with auto-filtering.

Feel free to share the doc with the changes you made, and I’ll take a look!

That’s an interesting approach, thanks for sharing! I like your concept of narrowing down a new user’s possibilities, in order to “keep them on the right track” :wink: