'Sort Numeric' block issue

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?

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


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

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

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

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.

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

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

Any news? @ioannis

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

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.

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

Create and Sort a list of objects

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