List.Sort by Value Issue

Hello All,
I have a weird situation with List.SortIndexByValue. If you take a look at the image below, you can see that lowest value has index 9 (-8930.xxxxx) but mentioned bloc show that index 10 has the lowest value.

Just to check, I did insert List.MinimumItem and it shows (as it should) that the lowest value is -8930.

Can someone help me with this one? Is there a similar block which works as it should? Can I use something similar?

Thanks in advance for your help.

List seems correct to me.

You lowest value, in the Point.X list, is at pos 9 therefor it is on top
on your List.SortIndexByValue list (at pos 0).
Then 10 at 1, 11 at 2 etc.

But the position 0 as per List.SortIndex is value -4118 not -8930 (pls see image below). That is what confuse me.

Can you enable the preview after rounding please?

My guess is that this may have to do with unit precision - there are a LOT of digits in there.

Yes, sorry, I should do that at first place…

Do they sort correctly if you skip these nodes and directly feed point.X into the sort by key node?

FYI @Michael_Kirschner2

Yes, it seems to be just like it should be. Thanks a lot for your help. I thought that I need to use sort of value to feed sort of key…

Thanks again for quickly responding.

False alarm: this is working correctly.

The results of the node don’t read as most nodes though.

Read the results as:

The 0 index comes from index 9.
The 1 index comes from index 10.
The 2 index comes from index 11…
The 10 index comes from index 0.
The 11 index comes from index 8.
The 12 index comes from index 4.

Not: the lowest value is from index 9…

That is what i said :smile:

1 Like


Thanks, I did not know that. :frowning:
Now, it seem that I needed to use List.Sort instead of SortIndex.Value…