# List.AddItemToFront behavior with Empty List

**URL:** <https://forum.dynamobim.com/t/list-additemtofront-behavior-with-empty-list/43461>\
**Category:** Lists-Logic\
**Created:** [November 21, 2019, 3:30pm UTC](https://forum.dynamobim.com/t/list-additemtofront-behavior-with-empty-list/43461 "2019-11-21T15:30:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [November 21, 2019, 3:30pm UTC](https://forum.dynamobim.com/t/list-additemtofront-behavior-with-empty-list/43461/1 "2019-11-21T15:30:40Z")

</div>

Hi guys,  
i simply want to merge those 2 lists at their respective index but i have the feeling that the empty list is creating a mess 🙂

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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 21, 2019, 4:22pm UTC](https://forum.dynamobim.com/t/list-additemtofront-behavior-with-empty-list/43461/2 "2019-11-21T16:22:03Z")

</div>

Hi @Daniel_Hurtubise

Is this what you’re looking to get?

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

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 21, 2019, 5:18pm UTC](https://forum.dynamobim.com/t/list-additemtofront-behavior-with-empty-list/43461/3 "2019-11-21T17:18:05Z")

</div>

Looks correct to me. You’re just inserting a list at the front of another list, not “joining” them. As Kulkul shows above, you just need to flatten your new sublists.

---

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [November 23, 2019, 7:09am UTC](https://forum.dynamobim.com/t/list-additemtofront-behavior-with-empty-list/43461/4 "2019-11-23T07:09:58Z")

</div>

I finally managed to get it done using List@Level and keep the list structure
