Unique keys order not matching: Brutto areas vs Room areas

Hi Forum

I am trying to understand why dynamo does not order unique keys for brutto areas and room areas since the parameter is the same (Building name)

I have also tried List.Sort to one of the List.GroupByKey node but then somehow the areas become mixed in the wrong Building number.

Any input would be highly appreciated to this new user in Dynamo. :slight_smile:

Best Regards,
Pedro A.

Try List.SortByKey

3 Likes

Because the data is not the same. GroupByKey groups the list based on the keys available. If the first key (value) is 0019 then the first group will be 0019. The order of the grouped keys is the order in which they were found within the list you provided. It’s specifically not sorting them.

As @Joelmick showed, you can either sort before or after grouping, but you must sort both outputs if you want the relationship to stay in tact.

That solved my issue right there. Thank you @Joelmick :slight_smile:

Thank also to you @Nick_Boyts for the explanation. :wink: