How to convert an outline into a table that preserves hierarchy (ie, with a parent column)?

There are already topics (eg, this one, this one) on converting an outline into a table. This is a great first step!

But the defining feature of an outline is its parent-child relationships. Converting an outline to a table without preserving these relationships isn’t a true conversion.

So how do you do this? In other words, how do you get from the outline below to the table below?

The only solution I can think of is one I don’t know how to implement. It involves these steps:

  1. Make a row for each bullet item.
  2. Determine the number of indentations for each item/row.
  3. Filter the table to only show the first row thru the current row
  4. Filter that list to only show the rows that have n-1 indentations (where n is the number of indentations that the current row has)
    5.Take the last item/row in that list (presumably this one is the current item’s parent)
  5. Insert it into the current row’s parent column.

So first, do you think this would work, and if so, do you know how to implement it in Coda? If not, do you know of another way to achieve true outline-to-table conversion?

I’ve been wondering and trying to figure it out for a long time. Any help would be greatly and gratefully appreciated! Thanks!

Hey — already replied here:

Particularly here I’m talking about the trick (at the ~1:00:00 timestamp):

When the new Canvas rolls out, the structure will look like this. So if you’re going to implement this now, plan in advance so that your code supports both versions preliminarily.


Thank you so much for taking the time to share this with me! And for the heads up about the changes to the Canvas column (I assume that’s what you’re referring to). Looks like I might have to finally learn JSON. :slight_smile:

1 Like

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