# Sort by Function doesn't work as I would

**URL:** <https://forum.dynamobim.com/t/sort-by-function-doesnt-work-as-i-would/106198>\
**Category:** Dynamo Player\
**Tags:** revit, dynamo\
**Created:** [November 29, 2024, 2:09pm UTC](https://forum.dynamobim.com/t/sort-by-function-doesnt-work-as-i-would/106198 "2024-11-29T14:09:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![B67-PC-03](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@B67-PC-03](https://forum.dynamobim.com/u/B67-PC-03)\
**Post date:** [November 29, 2024, 2:09pm UTC](https://forum.dynamobim.com/t/sort-by-function-doesnt-work-as-i-would/106198/1 "2024-11-29T14:09:00Z")

</div>

good morning everyone  
i know that the solution to my problem could probably be amateurish but i’m going crazy to make a simple sort by function work  
i’m trying to sort walls according to their structural material  
but (GB, BH, LP). i also tried with the width parameter (Dxxx in the type name)  
i can’t figure out where the error is.  
thanks a lot for the help

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/f/ff910a8d3de2a939512664b56703213bca9af8dd.png)

---

<div class="post-metadata">

**Author:** ![p.wehbi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/p.wehbi/32/173383_2.png) [@p.wehbi](https://forum.dynamobim.com/u/p.wehbi)\
**Post date:** [November 29, 2024, 4:54pm UTC](https://forum.dynamobim.com/t/sort-by-function-doesnt-work-as-i-would/106198/2 "2024-11-29T16:54:17Z")

</div>

Just use the “List.GroupByFunction” node instead of “List.SortByFunction” 🙂

---

<div class="post-metadata">

**Author:** ![B67-PC-03](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@B67-PC-03](https://forum.dynamobim.com/u/B67-PC-03)\
**Post date:** [December 1, 2024, 3:41pm UTC](https://forum.dynamobim.com/t/sort-by-function-doesnt-work-as-i-would/106198/3 "2024-12-01T15:41:28Z")

</div>

Great! it works! thank you very much!
