# Error in sorting lists and choosing component

**URL:** <https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384>\
**Category:** Report a Bug\
**Created:** [October 25, 2019, 5:15pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384 "2019-10-25T17:15:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Calandrino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alex_calandrino/32/335_2.png) [@Alex\_Calandrino](https://community.glideapps.com/u/Alex_Calandrino)\
**Post date:** [October 25, 2019, 5:15pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/1 "2019-10-25T17:15:05Z")

</div>

I found 2 bugs when using Glide:  
1 - You are not sorting the list alphabetically by going to the main screen to see clearly that it is out of order.  
2 - The choice component, using the phone is not possible to scroll the items on the screen, it is frozen (Android), and using the browser via desktop, the items are scrolled but it is not possible to click on the last item in the list. This is happening when the amount of items exceeds the viewing limit on the screen.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 25, 2019, 6:14pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/2 "2019-10-25T18:14:04Z")

</div>

1. Are you using the correct column for sorting? Are there any spaces in front of the value you are sorting by?

2. No problem scrolling for me with the choice component. I’m on Android.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [October 25, 2019, 6:21pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/3 "2019-10-25T18:21:38Z")

</div>

You do have spaces in front of some of your values.

Which Android version are you on? Could you share a video of that scrolling behavior?

---

<div class="post-metadata">

**Author:** ![Alex\_Calandrino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alex_calandrino/32/335_2.png) [@Alex\_Calandrino](https://community.glideapps.com/u/Alex_Calandrino)\
**Post date:** [October 25, 2019, 6:44pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/4 "2019-10-25T18:44:55Z")

</div>

- No spaces before values
- Android 8.1.0
- Samsung J7 Prime
- I can’t make a video

In the application link I submitted, click on the top menu and go to “Horarios” and try to choose a linha number. By browser via Desktop it scrolls all items but the latter has no choice. Via cell phone appears the list of items, but when you swipe the screen nothing happens in scrolls the items.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [October 25, 2019, 7:10pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/5 "2019-10-25T19:10:03Z")

</div>

The values in the “Nome” column in rows 8-11 and 13 have a space in front of them.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [October 25, 2019, 7:10pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/6 "2019-10-25T19:10:49Z")

</div>

Arguably Glide should ignore those when sorting.

---

<div class="post-metadata">

**Author:** ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)\
**Post date:** [October 25, 2019, 11:42pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/7 "2019-10-25T23:42:04Z")

</div>

Glide does now ignore leading and trailing spaces when sorting 🙂

---

<div class="post-metadata">

**Author:** ![Alex\_Calandrino](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alex_calandrino/32/335_2.png) [@Alex\_Calandrino](https://community.glideapps.com/u/Alex_Calandrino)\
**Post date:** [October 29, 2019, 11:11am UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/8 "2019-10-29T11:11:46Z")

</div>

> [@Alex\_Calandrino](#):
>
> No link do aplicativo que enviei, clique no menu superior e vá em “Horarios” e tente escolher um número de linha. Pelo navegador via Desktop, ele rola todos os itens, mas o último não tem escolha. Via telefone celular aparece a lista de itens, mas quando você desliza a tela, nada acontece nas rolagens dos itens.

Still the same problem

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 29, 2019, 5:42pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/9 "2019-10-29T17:42:33Z")

</div>

Scrolling or sorting? Does it work on other phones or on your computer?

---

<div class="post-metadata">

**Author:** ![Dreadaxe](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/dreadaxe/32/1213_2.png) [@Dreadaxe](https://community.glideapps.com/u/Dreadaxe)\
**Post date:** [November 4, 2019, 2:29pm UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/10 "2019-11-04T14:29:48Z")

</div>

Sort by AZ-ZA but don’t sort Dates, numbers…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/1095e91aadbd8ddaada5bb57374d545e2d2ee7e4.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [November 5, 2019, 3:04am UTC](https://community.glideapps.com/t/error-in-sorting-lists-and-choosing-component/1384/11 "2019-11-05T03:04:20Z")

</div>

Can you change the column you are using for sorting to be aaaa/mm/jj? It’s sorting the date as characters, so 2 is less than 8. Otherwise, try sorting by the original Date/Time stamp from glide. I’ve heard that a true date field should sort correctly, but I haven’t verified this. My first solution would definitely work though.
