Classification Style Writing Structure in Coda

Hi all,

I have a table that I want to essentially act as a “classification” style writing structure where I want each of my rows to have a designation like “Section 1, Article 2”. I want to be able to manually sort the order of the sections and articles and have the number change appropriately.

So if I move a section to the top of the table it becomes Section 1. And then if I have 5 articles associated with any given section, they should be numbered based on their order within the table, but with respect to whether they are associated with the same section or not. That last part is the hard part that I need help with.

My setup so far:

My table has a relation to itself so that I can link the articles to the overall sections.

I have a formula column called Structure that when the relation column is filled for the row then it prints “Article”, otherwise it prints “Section”.

I’ve added 2 table views that filter for Section and Article respectively. So that’s the setup: one primary table but table views that only show sections and articles respectively.

Using this formula I am able to get a row number based on the current sorting order of the sections and articles respectively:

if(thisRow.Structure="Article", [Articles Table].Find(thisRow), [Sections Table].Find(thisRow))

So that gets me a current row order # of both the articles and the sections and it doesn’t mix the two. But that’s where I’m stumped. I don’t know what I can do to make the article numbering respect the section that the article is under. I’m imagining that this requires either a formulamap or a currentvalue, but I find these concepts a little tricky to wrap my head around. Could anyone help me out here?

Hey @Mitchell_Wells,

Thanks for your post! We would be happy to take a look at this for you if you would like to share a sample doc so we can see a sample of the data you are working with.

Let us know when you can!

All my best,
Dan

Hi @Dan_Demers, thanks for looking into this. I’ve mocked up an example in the embed below.

Essentially just want to prefix the name of my row with a generated number based on how it’s sorted in the table. I just hit a dead end when it comes to getting the article # to respect how many other articles are attached to the parent.

You don’t need to pay that much attention to my shoddy solution if there’s just a fundamentally better approach, I’m not attached to it.

Thanks for following up @Mitchell_Wells .

Would you mind sharing your doc with us so we can take a closer look at the issues you’re encountering?

You can do that by going to Share in the top right-hand corner, clicking the button in the top right (to the left of the “X”), and toggling on Share with Coda Support (the gif below shows how to do this).

Afterward, please send us a link to that doc in your response so we can take a look for you! :smiley:

Hi Shaina,

Thanks for looking into this. Does this link work for you?