# 'Sort Numeric' block issue

**URL:** https://community.thunkable.com/t/sort-numeric-block-issue/2832870
**Category:** Issues / Bugs
**Created:** [February 13, 2024, 8:44pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870 "2024-02-13T20:44:27Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 13, 2024, 8:44pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/1 "2024-02-13T20:44:27Z")

</div>

The ‘sort numeric’ block used to work with a combination of numbers and letters/characters as long as the numbers were at the front of the string ie:

3 - info  
1 - more info  
2 - some info

Would be sorted in to numeric order of 1,2,3.

The block has changed and will now only work if the string contains strictly only numbers, if any other characters are present the block is ignored.  
Is there any way this can be put back to its previous far more useful operation?

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [February 13, 2024, 9:03pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/2 "2024-02-13T21:03:34Z")

</div>

Hello @martint  
Could you please select sort “alphabetic”?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b9f0f63700b0a8e4106430dedcf7f8d6d65a3e03.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/46d15791055652e4403d622c461542440aeeb986.png)

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 13, 2024, 9:27pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/3 "2024-02-13T21:27:05Z")

</div>

Hi @ioannis, Alphabetic only works with a single digit, with double digits it lists all 1s first so 11 would come before 2 etc.

---

<div class="post-metadata">

### Author: ![samclever](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@samclever](https://community.thunkable.com/u/samclever)
#### Post date: [February 14, 2024, 4:06am UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/4 "2024-02-14T04:06:39Z")

</div>

is the list a preset list like the one shown or is it a list that gets added to in a variable?

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 14, 2024, 7:59am UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/5 "2024-02-14T07:59:20Z")

</div>

My lists are mostly dynamic so in variables but the issue affects any use of the sort numeric block including preset lists as above.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 14, 2024, 1:48pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/6 "2024-02-14T13:48:22Z")

</div>

The issue is that you are trying to sort a numeric based list however you are actually sorting. Text strings. Any string that starts with 1 will come before a string that starts with 2

You need to sort these as objects most likely then reformat your data as required for output.

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 14, 2024, 2:02pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/7 "2024-02-14T14:02:13Z")

</div>

You are correct @jared but the Numeric block used to be able to sort it.

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 14, 2024, 5:34pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/8 "2024-02-14T17:34:33Z")

</div>

Do we know if the devs can revert this block back to its previous glory? @ioannis

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 16, 2024, 2:46pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/9 "2024-02-16T14:46:32Z")

</div>

Any news? @ioannis

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [February 16, 2024, 4:07pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/10 "2024-02-16T16:07:16Z")

</div>

Hello @martint  
Even though the block used to work like that, I think the way that it is now implemented is correct.  
It is still possible to sort the list of text based on the number, here is an [example project](https://x.thunkable.com/projects/65cbd777e10389a428aa59ee/f93e9714-fd6d-4db4-9901-fadac922f5e9/blocks)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/b/0bfecb113ccd38491e48baa8a811a83d10a76353.png)

---

<div class="post-metadata">

### Author: ![martint](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/martint/32/96689_2.png) [@martint](https://community.thunkable.com/u/martint)
#### Post date: [February 16, 2024, 6:05pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/11 "2024-02-16T18:05:05Z")

</div>

So how about an alpha-numeric option for the sort block?

My lists are not always consecutive numbers, your example leaves gaps for any missing numbers.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [February 19, 2024, 5:52pm UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/12 "2024-02-19T17:52:18Z")

</div>

Hello @martint  
Unfortunately, this is the best solution that I have for now.  
To remove the gaps I used the “trim spaces” blocks

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [February 20, 2024, 10:49am UTC](https://community.thunkable.com/t/sort-numeric-block-issue/2832870/13 "2024-02-20T10:49:56Z")

</div>

> [@martint](#):
>
> The ‘sort numeric’ block used to work with a combination of numbers and letters/characters as long as the numbers were at the front of the string ie:

Create and Sort a list of objects

If this data is coming in from your backend sort it there
