Sort a Joined List using a secondary joined list as sort keys

Finally found a reason to have a play with this one :smiley:

Not sure how useful this will be for others, but @Jeff_Hager might find it of interest.

It accepts two joined lists, and will sort the values in the first list using the values in the second list as sort keys, and will return the sorted list as a single string with the delimiters stripped out.

I had a very specific use case for this, which was to transform a table like this:

into this:

It takes an optional delimiter as a 3rd parameter. In this case I used || in my joined lists as the source data (the dates) contains commas.

https://jl-sort-by-keys.mcdarren.repl.co

7 Likes

Yessss

1 Like