Using a Canvas to display a Table within a Column, and generating that Table based on the row value of another Column in the main Table

Hi all,
I’m very new to Coda but am finding it very useful and intuitive. I do occasionally run into a roadblock when working with formulas, but usually can work out what I’m trying to accomplish.

I’ve got a scenario right now that I’m continuing to puzzle over, and thought it’s a good time to reach out to the community for some input, or a different way of thinking about my problem.

I’ve got a spreadsheet template used for keeping track of fiber optic cable usage on projects. You can think of it as having two sections:

  1. Cable Schedule
    This table is basically an index of all the cables in use—Origin and destination, cable length, is it a 12-strand or 24-strand cable?

  2. Strand Assignments
    This is a set of sub-tables, one for each cable. It holds information for each strand of the cable—What kind of signal is carried, what hardware is it connecting to on each side, is it cross-patching to another cable?

I figured Coda could do this better than the manual spreadsheet method, and I’m off to a good start with it. I’ve got one master table that holds all of the cables, and then a Canvas Column for strand assignments. I’ve got a template for that table created as a subpage of my attribute tables page, and so I can set the Value for new rows as that page. What I’d REALLY LIKE to do is to have a different strand assignments table based on whether the Cable Type for that row is a 12-strand or 24-strand cable. I’ve tried using a filtered view, or creating two separate templates and using an if
formula, but am not finding success.

It occurs to me as I type this—the Value for new rows formula calculates when you create the new row, before you’ve even defined the cable type on that row.
I know there’s got to be a better solution for this than just generating the table for all 24 strands and deleting the half you don’t need for a TAC-12 cable, and look forward to seeing others’ thoughts on this. Meanwhile, I’ll keep tinkering!

1 Like

Not a whole lot of progress on automating the strand assignments sub-table generation, but I have come up with a sort of workaround. In the Template page that is duplicated into each new row’s canvas column, I’ve added a filter that can select the cable type (from a hidden column) and display the rows accordingly. This is more elegant than just deleting the rows manually (or with a button, as I also played with earlier), but I still want to see some automation happen here.

Edit to add: It is nice that with this filter method, I can have TAC-12 selected by default, as this will be the cable type 99% of the time.

It looks like I celebrated that workaround too soon. It looks like when the template is duplicated into the canvas column on the main table, it only duplicates those rows that are visible based on the state of the filter on the template page. The filter is there, the lookup control is there, but if the control on the template page is set to “blank” you’ve got no rows at all in the duplicated table…

Hey Daniel,

Cool puzzle! Are 12 strand or 24 strand the only two options that would determine the setup of the strand assignment table?

I setup a switch formula (that requires some copy and pasting of the page objects) that switches the canvas template filtered to 12 strand or 24 strand objects here.

Let me know if that helps?

Hi @Daniel_LeBlanc,

If what I understood of what you are trying to accomplish is correct, you may find that using linked tables instead of canvas will work better.

Creating a table in canvas and replicating it for every row is not a very efficient and cannot be centrally managed. E.g. Adding new columns or changing naming/colour conventions.

I think you would be better served by having a singular table of strand assignments and use it as a column in the cable schedule table.

I have replicated your screenshots in this published doc if you want to make a copy:

I have added documentation to it to show how it works.

Please take a look and let me know what you think. If I am way off base perhaps we can work something else out.

All the best