# Omit Sub List from List of Lists

**URL:** <https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654>\
**Category:** Lists-Logic\
**Created:** [March 28, 2017, 9:39pm UTC](https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654 "2017-03-28T21:39:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfglazer](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@dfglazer](https://forum.dynamobim.com/u/dfglazer)\
**Post date:** [March 28, 2017, 9:39pm UTC](https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654/1 "2017-03-28T21:39:05Z")

</div>

I am wondering what the basic approach to filtering a list of lists. Some of the sublists have a room name that starts with BM.

I want to make a new list that does not include sublist with BM rooms. Like this conceptually:

if sublist contains "BM"  
then exclude sublist  
else  
end

Tried several things but I am too new to resolve this.

Thanks

Daniel

---

<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:** [March 29, 2017, 1:32am UTC](https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654/2 "2017-03-29T01:32:50Z")

</div>

Hi @dfglazer

String.Contains node will get you started. You can add “RM” string value to search for. It will give you booleans list and then finally you use filter by bool mask node to filter. Make sure you set lacing to longest for String.Contains node as your list contains sublists.

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [March 29, 2017, 2:04am UTC](https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654/3 "2017-03-29T02:04:21Z")

</div>

Like this:

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

---

<div class="post-metadata">

**Author:** ![dfglazer](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@dfglazer](https://forum.dynamobim.com/u/dfglazer)\
**Post date:** [March 29, 2017, 5:22pm UTC](https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654/4 "2017-03-29T17:22:14Z")

</div>

Thank you for taking a look, 🙂 using the web as it was intended.

Following-up:  
What I am trying to do is omit the **entire sublist** if a specific index (#4) in the sublist contains a specific value (NULL). (a slight change from when I was looking for the string “BM”).

Why do I need to do this? It will eliminate rooms that are not in the model from the list of room properties since node #4 is room area which is null for rooms that are not placed.

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [March 29, 2017, 5:37pm UTC](https://forum.dynamobim.com/t/omit-sub-list-from-list-of-lists/10654/5 "2017-03-29T17:37:44Z")

</div>

New question, please start a new thread.
