# Manual sorting

**URL:** <https://community.glideapps.com/t/manual-sorting/22764>\
**Category:** Ask for Help\
**Created:** [February 14, 2021, 10:58am UTC](https://community.glideapps.com/t/manual-sorting/22764 "2021-02-14T10:58:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![yann](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yann/32/20115_2.png) [@yann](https://community.glideapps.com/u/yann)\
**Post date:** [February 14, 2021, 10:58am UTC](https://community.glideapps.com/t/manual-sorting/22764/1 "2021-02-14T10:58:34Z")

</div>

Is there a way to implement manual sorting for lists? For example, I am creating an app for my band with the list of songs we play. Each song is a card with a name, chords, tempo, etc. I would like to sort cards by drag-and-drop to have the songs in the order we play them.

---

<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:** [February 14, 2021, 11:08am UTC](https://community.glideapps.com/t/manual-sorting/22764/2 "2021-02-14T11:08:44Z")

</div>

Drag and drop for reordering lists is not possible.

But I think you could get close to this with clever use of the Increment action…

- create a numeric column, and use this to sort your song list (probably highest to lowest)
- use an increment action to add 1 to that column each time you tap on song in the list

The effect of that should be that tapping any song should move it up the list

---

<div class="post-metadata">

**Author:** ![yann](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yann/32/20115_2.png) [@yann](https://community.glideapps.com/u/yann)\
**Post date:** [February 14, 2021, 11:22am UTC](https://community.glideapps.com/t/manual-sorting/22764/3 "2021-02-14T11:22:51Z")

</div>

Thank you, @Darren_Murphy, that’s a way to go! Yet tapping on the card should open the details screen (lyrics, comments etc.), so I will have to think of something else to tap. There’s no “long tap” in Glide, right?

---

<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:** [February 14, 2021, 11:29am UTC](https://community.glideapps.com/t/manual-sorting/22764/4 "2021-02-14T11:29:30Z")

</div>

No long tap, no.  
If you still need to view details, then another option could be to add two floating buttons to the details screen - one to increment, and the other to decrement. This would be a little more cumbersome, but should still work.

---

<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:** [February 14, 2021, 1:13pm UTC](https://community.glideapps.com/t/manual-sorting/22764/5 "2021-02-14T13:13:13Z")

</div>

@yann just for a bit of fun, I made a quick mockup to see how this could work.

> **[Glide Community Forum](https://glide-community.glideapp.io/)**

Look for the “Playlist” tab.  
The app is copyable.

---

<div class="post-metadata">

**Author:** ![yann](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yann/32/20115_2.png) [@yann](https://community.glideapps.com/u/yann)\
**Post date:** [February 14, 2021, 1:27pm UTC](https://community.glideapps.com/t/manual-sorting/22764/6 "2021-02-14T13:27:46Z")

</div>

Got it, thank you! The problem with incremental sort is that you don’t really know, how many time you should tap to have the item in the position you want it to be - because you don’t know the ratings of other items. So your first suggestion (to make the card action “increment”) is better because you can immediately see the result.

I ended up with two screens: one for setting up the setlist (check & sort), the other - to display the result. So the card action is “increment” on the first screen and “details” on the second.

---

<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:** [February 14, 2021, 1:30pm UTC](https://community.glideapps.com/t/manual-sorting/22764/7 "2021-02-14T13:30:48Z")

</div>

> [@yann](#):
>
> The problem with incremental sort is that you don’t really know, how many time you should tap to have the item in the position you want it to be - because you don’t know the ratings of other items.

Yeah, that also occurred to me.  
You could probably add something to the details view that indicates the current position of the song in the list, and get that to update dynamically as you tap the buttons. But maybe that’s more work than it’s worth…

---

<div class="post-metadata">

**Author:** ![ALEKSEI\_BARANOV](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/aleksei_baranov/32/33948_2.png) [@ALEKSEI\_BARANOV](https://community.glideapps.com/u/ALEKSEI_BARANOV)\
**Post date:** [November 10, 2021, 8:18am UTC](https://community.glideapps.com/t/manual-sorting/22764/8 "2021-11-10T08:18:41Z")

</div>

Hi Darren!  
Thank you for the mockup, I’ve think the same direction with a Flow Button by increment\decrement a Sorting field.  
This works great for a few Songs, but seems it would be not so easy for tens or hundred of Photos… Seems for the last case we have to assign some Value (Order #?) to the Sorting Field when we add a new Item?

---

<div class="post-metadata">

**Author:** ![Lin\_Altshuler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lin_altshuler/32/32591_2.png) [@Lin\_Altshuler](https://community.glideapps.com/u/Lin_Altshuler)\
**Post date:** [November 10, 2021, 9:24am UTC](https://community.glideapps.com/t/manual-sorting/22764/9 "2021-11-10T09:24:39Z")

</div>

Hi!  
This topic appeared just on time because I could use you expert help on this as well.  
I have a relation list that I Join as templated column to turn to a HTML table.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/d/ede464af6c75e7680ea64ee998db634502554e9f.jpeg)

I sort the list using the sort number but the HTML table isn’t effected because  
the sort of the join list from the relation only knows to go by sheet order.  
Is there any way I can Sort it within the table by a numeric column?  
any HTML trick for it?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2faf45e43c4b76fc202eb2cf2c9d428d86006aca.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/e/dec0e5067be8d5add2c4f377459b9433b7e5f3b1.png)

---

<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:** [November 11, 2021, 4:57am UTC](https://community.glideapps.com/t/manual-sorting/22764/10 "2021-11-11T04:57:28Z")

</div>

Maybe this?

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

---

<div class="post-metadata">

**Author:** ![Lin\_Altshuler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lin_altshuler/32/32591_2.png) [@Lin\_Altshuler](https://community.glideapps.com/u/Lin_Altshuler)\
**Post date:** [November 11, 2021, 5:43am UTC](https://community.glideapps.com/t/manual-sorting/22764/11 "2021-11-11T05:43:46Z")

</div>

YES!!  
Thank you again and again and again 🤩

---

<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:** [November 11, 2021, 5:54am UTC](https://community.glideapps.com/t/manual-sorting/22764/12 "2021-11-11T05:54:09Z")

</div>

I’m happy it’s finally useful for someone other than me 🙂

Actually, @Lin_Altshuler I just noticed that post links to a Replit repository. I moved all of my code columns to GitHub some time ago, so I’m no longer maintaining the replit repo. Here is the link to the GitHub repo if you need it:

[https://mcdarren.github.io/glide-jl-sort-by-keys/](https://mcdarren.github.io/glide-jl-sort-by-keys/)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [November 11, 2021, 9:30am UTC](https://community.glideapps.com/t/manual-sorting/22764/13 "2021-11-11T09:30:59Z")

</div>

Just want to say thanks again for that thread. It helps me a lot with creating charts in Quickchart or YC columns 😉

---

<div class="post-metadata">

**Author:** ![biha](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/biha/32/84110_2.png) [@biha](https://community.glideapps.com/u/biha)\
**Post date:** [September 12, 2023, 9:19am UTC](https://community.glideapps.com/t/manual-sorting/22764/14 "2023-09-12T09:19:24Z")

</div>

This is exactly what i need to do , but quite weird…

i need to do something like this:

Let say,

1. Quotation
2. Part Requisition
3. Service
4. Invoice (click “UP” once)
5. Payment

then it will be:

1. Quotation
2. Part Requisition
3. Invoice (click “UP” one more time)
4. Service
5. Payment

It become:

1. Quotation
2. Invoice
3. Part Requisition
4. Service
5. Payment

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:49pm UTC](https://community.glideapps.com/t/manual-sorting/22764/15 "2024-01-17T16:49:08Z")

</div>


