# Messed order in merge component

**URL:** <https://discourse.mcneel.com/t/messed-order-in-merge-component/87187>\
**Category:** Grasshopper\
**Created:** [August 7, 2019, 11:01am UTC](https://discourse.mcneel.com/t/messed-order-in-merge-component/87187 "2019-08-07T11:01:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Piotr](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piotr/32/635473_2.png) [@Piotr](https://discourse.mcneel.com/u/Piotr)\
**Post date:** [August 7, 2019, 11:01am UTC](https://discourse.mcneel.com/t/messed-order-in-merge-component/87187/1 "2019-08-07T11:01:44Z")

</div>

Hi Guys  
Is it a bug or expected behaviour?  
Merge component doesn’t keep the connections order, even if they are re-connected at proper order.

 ![messed%20order](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/9/9/991b3f8f27327badbc4ad3ab6f7aac982a7f2fe6.png)  
Check out the red fields.

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [August 7, 2019, 12:08pm UTC](https://discourse.mcneel.com/t/messed-order-in-merge-component/87187/2 "2019-08-07T12:08:40Z")

</div>

Data trees strike again! Merge combines branches and it frequently happens that the inputs you want to combine in a single list have different paths, so they end up on different branches. There is no perfect solution, it can be very frustrating… One thing that works in some cases is to flatten the inputs to Merge.

---

<div class="post-metadata">

**Author:** ![Piotr](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piotr/32/635473_2.png) [@Piotr](https://discourse.mcneel.com/u/Piotr)\
**Post date:** [August 7, 2019, 12:24pm UTC](https://discourse.mcneel.com/t/messed-order-in-merge-component/87187/3 "2019-08-07T12:24:31Z")

</div>

Hi Joseph  
Thanks for the tip. Flattening all inputs restored the order.  
I do agree with you it can be frustrating… luckily in this case I didn’t care about the data structure, just the displayed order.

---

<div class="post-metadata">

**Author:** ![DavidRutten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/davidrutten/32/755688_2.png) [@DavidRutten](https://discourse.mcneel.com/u/DavidRutten)\
**Post date:** [August 7, 2019, 2:03pm UTC](https://discourse.mcneel.com/t/messed-order-in-merge-component/87187/4 "2019-08-07T14:03:58Z")

</div>

The Entwine component will let you do a merge+flatten in one go.

---

<div class="post-metadata">

**Author:** ![Piotr](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piotr/32/635473_2.png) [@Piotr](https://discourse.mcneel.com/u/Piotr)\
**Post date:** [August 7, 2019, 2:39pm UTC](https://discourse.mcneel.com/t/messed-order-in-merge-component/87187/5 "2019-08-07T14:39:49Z")

</div>

Cool, thanks.
