# How to sort a Table built with a Joined List

**URL:** <https://community.glideapps.com/t/how-to-sort-a-table-built-with-a-joined-list/46869>\
**Category:** Ask for Help\
**Created:** [August 15, 2022, 8:54pm UTC](https://community.glideapps.com/t/how-to-sort-a-table-built-with-a-joined-list/46869 "2022-08-15T20:54:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Killko](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/killko/32/39538_2.png) [@Killko](https://community.glideapps.com/u/Killko)\
**Post date:** [August 15, 2022, 8:54pm UTC](https://community.glideapps.com/t/how-to-sort-a-table-built-with-a-joined-list/46869/1 "2022-08-15T20:54:07Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [August 16, 2022, 12:25am UTC](https://community.glideapps.com/t/how-to-sort-a-table-built-with-a-joined-list/46869/2 "2022-08-16T00:25:48Z")

</div>

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):

```auto
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](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/f/5f8dc1962e7b546914d96d16b9f9f7545fcd5f16.png)

Link to use in Glide Code column → [Glide Yes-Code](https://mcdarren.github.io/glide-jl-sort-by-keys-advanced/)

Link to source repo → [GitHub - mcdarren/glide-jl-sort-by-keys-advanced](https://github.com/mcdarren/glide-jl-sort-by-keys-advanced)

See also: [Sort a Joined List using a secondary joined list as sort keys](https://community.glideapps.com/t/sort-a-joined-list-using-a-secondary-joined-list-as-sort-keys/30412)
