Zero-padding Sort in Coda

Hi all, can you help me uncover the formulas used in what order to apply based on this forum:

Demonstrated in this Coda Doc

Keen to hear your opinions on multiple parent / child relationships and allowing them to stack and sort correctly.

Thanks in advance :smiley:

You could have a column as input (1.1; 1.1.1 etc) and another helper column with a toNumber formula. Then you can use a switchIf formula but that would mean you have to know the max level of nesting.

Hi Christian, I agree a column with an input column is achievable however I was hoping to have my primary column as a text field for name of item name (or subitem names). This would still require your suggestion but with some more complex formula as it would need to reference RowID and have a lookup on multiple foreach parent items.

Keen to see this become a realisation :slight_smile:

I just added my answer to that topic. Wondering how I’ve missed that.

This works not only on numbers. You can create any lists and sort between them. No need for zero padding.

1 Like

Hi @Paul_Danyliuk,

I don’t really understand this is meant.

If you add dots to the numbers, sorting doesn’t work anymore.

I am currently using the zero padding technique, but if there is an easier way with the same output, I am happy to use that one instead.

I mean this. Turn each of your version strings into a list of numbers (perhaps no need to make them numbers even; Coda auto-assumes numbers there and sorts them as numbers already) and sort on those

1 Like

Okay, I got it.
Thanks for the further explanation.

Best regards
Jannis