How to sort a Table built with a Joined List

I wanted to be able to copy to the clipboard a table created by joining several columns and specific rows.

I used a template and a joined list to create a table that can be copied through a button to the clipboard. It is formatted so that I can then just paste it into a spreadsheet.

Works like a charm, the only issue is that I’d like to sort the table by the first column before copying it to the clipboard.

Any idea how to do that ?

I needed to do this to be able to sort HTML tables. I couldn’t find a way with standard computed columns, so I wrote my own plugin to do it. You’re welcome to use it or clone it.

Actually, because it was primarily written to work with HTML tables, it will need a minor tweak to work for your use case. If you examine the source, in function.js you’ll see the following line (31):

var joined = sorted.join('');

You would just need to tweak that line so that it inserts a delimiter.

Screen Shot 2022-08-16 at 8.21.27 AM

Link to use in Glide Code column → Glide Yes-Code

Link to source repo → GitHub - mcdarren/glide-jl-sort-by-keys-advanced

See also: Sort a Joined List using a secondary joined list as sort keys

4 Likes