# Filter the list from nulls

**URL:** <https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317>\
**Category:** Revit\
**Created:** [December 14, 2020, 12:31pm UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317 "2020-12-14T12:31:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ALEBIM2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alebim2/32/40063_2.png) [@ALEBIM2](https://forum.dynamobim.com/u/ALEBIM2)\
**Post date:** [December 14, 2020, 12:31pm UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/1 "2020-12-14T12:31:43Z")

</div>

![REMOVE NULLS 1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/a/4a9d13b8c914aa6b9bb4fa3d3afe78868e197612.png) Hello I am trying to filter a list of nulls, keeping those that are not null, but the result with the node “filterby boolean mask” is not the desired one, since it gives me sublists, because the mask is organized that way  
 ![REMOVE NULLS 2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2f46f55ac76258e44e848e010f2001f96e69d8e0.png)

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [December 14, 2020, 1:17pm UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/2 "2020-12-14T13:17:50Z")

</div>

Try using a List.AnyTrue node after the IsNull and make sure your lacing is correct. That should get your initial list and the True/False back to matching lists.

---

<div class="post-metadata">

**Author:** ![Jean-Marc](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jean-marc/32/79122_2.png) [@Jean-Marc](https://forum.dynamobim.com/u/Jean-Marc)\
**Post date:** [December 14, 2020, 1:51pm UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/3 "2020-12-14T13:51:03Z")

</div>

Not sure I understand properly the goal. But using list.clean with the bool input at false will remove nulls

---

<div class="post-metadata">

**Author:** ![ALEBIM2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alebim2/32/40063_2.png) [@ALEBIM2](https://forum.dynamobim.com/u/ALEBIM2)\
**Post date:** [December 15, 2020, 2:07am UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/4 "2020-12-15T02:07:46Z")

</div>

the nulls appear when I try to get the faces of the beams from the first list, and then those nulls give me trouble during the script routine, therefore I want to leave the list without those troublesome beams

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [December 15, 2020, 7:27am UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/5 "2020-12-15T07:27:39Z")

</div>

Hi alebim2!  
Is using list.clean as Jean Marc suggested or replace.null not what you are looking for?

---

<div class="post-metadata">

**Author:** ![Jean-Marc](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jean-marc/32/79122_2.png) [@Jean-Marc](https://forum.dynamobim.com/u/Jean-Marc)\
**Post date:** [December 15, 2020, 4:50pm UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/6 "2020-12-15T16:50:12Z")

</div>

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

> **[Dynamo Dictionary](https://dictionary.dynamobim.com/#/Core/List/Action/Clean)**

---

<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:** [December 15, 2020, 4:55pm UTC](https://forum.dynamobim.com/t/filter-the-list-from-nulls/58317/7 "2020-12-15T16:55:26Z")

</div>

You want to use @SeanP’s method of checking to make sure _all_ surfaces exist first.
