List.GroupByKey doesn't sort a seemingly random element

Hey Guys!

I’ve got a strange problem with the node mentioned in the topic. I’m sorting, and grouping a list of rooms from a linked file. The sorting and grouping is quite complicated, and it mostly works well, but I found a strange anomaly. In the last L3 list, all sublists (L2) get one element that should have been put in somewhere else. Once it’s in the middle of a list, and twice at the beginning of them.

Is this some kind of common error? Maybe when I sorted by Key and replaced some of the Keys with different values this error accrued?

Karty pięter - Przepisanie danych mieszkań.dyn (137.0 KB)

I think you should try it without the List.Sort.
Edit: I’m actually very confident that that is the issue, the List.Sortcauses the parameter values to be “unaligned” with the actual elements.

The Sort.List was because in the last L3 for some meason it sorted ACB, instead ABC like in all others. But I found the problem.

The linked file which the rooms are taken from is work in progress, and I didn’t notice that there were a few rooms with wrong parameters, which probably caused the random element change, and wrong sorting. After eliminating the problems with room parameters the sorting works, fine also without the additiona List.Sort.

Topic can be closed.

I would still remove the List.Sort node if I were you.
It either does nothing or something wrong.

Yes, I already did, thank you. :slight_smile:

In the case you’d still want the list to end up in a certain order I could help you with that.

1 Like

I think I’m good at the moment, thank you. :slight_smile:

1 Like