# Merge 2 lists into 1

**URL:** <https://forum.dynamobim.com/t/merge-2-lists-into-1/18022>\
**Category:** Uncategorized\
**Created:** [January 10, 2018, 12:44pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022 "2018-01-10T12:44:43Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 12:44pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/1 "2018-01-10T12:44:44Z")

</div>

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

Can anyone help to merge these 2 lists into 1?

I want to overwrite index from 1 list to the other if it does not say “tavlediagram”

---

<div class="post-metadata">

**Author:** ![Tomasz\_Puchala](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Tomasz\_Puchala](https://forum.dynamobim.com/u/Tomasz_Puchala)\
**Post date:** [January 10, 2018, 12:47pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/2 "2018-01-10T12:47:46Z")

</div>

Please search forum

---

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 12:54pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/3 "2018-01-10T12:54:10Z")

</div>

Cant find what Im looking for?

---

<div class="post-metadata">

**Author:** ![APELAEZDELEE](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/apelaezdelee/32/37010_2.png) [@APELAEZDELEE](https://forum.dynamobim.com/u/APELAEZDELEE)\
**Post date:** [January 10, 2018, 1:06pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/4 "2018-01-10T13:06:57Z")

</div>

Hi @moeng try:

 ![list join](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/2/827abbca533cfcbc324aa5a821939cc84116d989.png)

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 10, 2018, 1:15pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/5 "2018-01-10T13:15:50Z")

</div>

Could you give an example for from what to what you’d like it to go? There’s many ways you could combine two lists.

---

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 1:21pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/6 "2018-01-10T13:21:58Z")

</div>

I want to overwrite the indexes of the top list with the bottom list .  
But only when the bottom list does not say “Tavlediagram”

Makes sense?

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 10, 2018, 1:25pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/7 "2018-01-10T13:25:30Z")

</div>

Not quite.

II think it should be solvable via an if statement.

For the ease of it and before I’d start to buy a wrong program, could you show the result you’d like from the image?

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [January 10, 2018, 1:26pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/8 "2018-01-10T13:26:46Z")

</div>

> **[Examples for All List Actions in DYNAMO](http://plevit1.blogspot.com/2015/01/examples-for-all-list-actions-in-dynamo.html)**
>
> This blog mostly contains small tips and unique ideas about Revit.
> Revit Family Download

---

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 1:31pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/9 "2018-01-10T13:31:57Z")

</div>

0 gdfhgfdhgf  
1 Tavlediagram  
2 Tavlediagram  
3 dfhfgjf  
4 Tavlediagram  
5 Tavlediagram  
6 Tavlediagram  
7 45435

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 10, 2018, 1:32pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/10 "2018-01-10T13:32:57Z")

</div>

What if you get two non-“Tavlediagrams”?

---

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 1:37pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/11 "2018-01-10T13:37:23Z")

</div>

Then it should also replace

---

<div class="post-metadata">

**Author:** ![PauLtus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paultus/32/48502_2.png) [@PauLtus](https://forum.dynamobim.com/u/PauLtus)\
**Post date:** [January 10, 2018, 1:39pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/12 "2018-01-10T13:39:13Z")

</div>

Yeah, but should it replace the thing from list 1 with that from list 2 or the other way around?

---

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 1:40pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/13 "2018-01-10T13:40:21Z")

</div>

Think I got it now…  
Thanks for the help anyway.

---

<div class="post-metadata">

**Author:** ![moeng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/moeng/32/39685_2.png) [@moeng](https://forum.dynamobim.com/u/moeng)\
**Post date:** [January 10, 2018, 1:41pm UTC](https://forum.dynamobim.com/t/merge-2-lists-into-1/18022/14 "2018-01-10T13:41:09Z")

</div>

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