# Sorting issue

**URL:** <https://forum.dynamobim.com/t/sorting-issue/110812>\
**Category:** Lists-Logic\
**Created:** [June 18, 2025, 12:30pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812 "2025-06-18T12:30:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [June 18, 2025, 12:30pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812/1 "2025-06-18T12:30:41Z")

</div>

i have a script that renames details with their sheet numbers. we have added some offices and so we had to added some suffixs to the numbers for regonal variation. i was able to weed out the suffixs but when i recreate the list it changes the order of the list. any sugestions how i can maintain the list order?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/b/2b216b6c5cc00dd71b093665943324057934971a.jpeg)

---

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [June 18, 2025, 12:49pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812/2 "2025-06-18T12:49:34Z")

</div>

for clarification i could just find and replace the “-mid” but that is just the one of the many sufixs and they could potentially increase as we expand.

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [June 18, 2025, 1:23pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812/3 "2025-06-18T13:23:19Z")

</div>

Hey,

If I understand the problem correctly…

So your boolean filter strategy filters off the items you are interested, but then they are out of step with the data streams which have not been filtered?

So as I see it, you have 2 strategies…

1. Copy your boolean filter down to your other data streams, keep the same mask… Then you can repeat the ‘join’ node on those other data streams and your data will be consistant.
2. Instead of the boolean filter, use a strategy of replacing at indices… note the indices, grab the ones you want, edit them, and reuse the indices to replace the old values.

Hope that helps,

Mark

---

<div class="post-metadata">

**Author:** ![l.dorrestijn](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@l.dorrestijn](https://forum.dynamobim.com/u/l.dorrestijn)\
**Post date:** [June 18, 2025, 1:30pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812/4 "2025-06-18T13:30:59Z")

</div>

maybe if the seperator is always “-” use string split? that way the order of the list remains the same.

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

---

<div class="post-metadata">

**Author:** ![gilberto.arechigaiba](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gilberto.arechigaiba/32/204980_2.png) [@gilberto.arechigaiba](https://forum.dynamobim.com/u/gilberto.arechigaiba)\
**Post date:** [June 18, 2025, 1:32pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812/5 "2025-06-18T13:32:13Z")

</div>

Hola amigos buenas. 🤠  
Amigo @DangeRuss I always like to play with the index of the items, add one step to your script:  
1 join both list afther the boolean mask.  
2 then ask the index of the original list.  
3 ask the item at index from the replaced and joined list to retake the original order, i let you an example.

 ![Retake Original Order](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/2/026e918856b4818f370024db0103a4ba7ce39c29.png)

---

<div class="post-metadata">

**Author:** ![DangeRuss](https://avatars.discourse-cdn.com/v4/letter/d/48db29/32.png) [@DangeRuss](https://forum.dynamobim.com/u/DangeRuss)\
**Post date:** [June 18, 2025, 1:43pm UTC](https://forum.dynamobim.com/t/sorting-issue/110812/6 "2025-06-18T13:43:36Z")

</div>

dude thanks… this is a way easier method!
