# "IF" node for List

**URL:** <https://forum.dynamobim.com/t/if-node-for-list/112322>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [September 12, 2025, 12:15pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322 "2025-09-12T12:15:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![cchulia](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cchulia](https://forum.dynamobim.com/u/cchulia)\
**Post date:** [September 12, 2025, 12:15pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/1 "2025-09-12T12:15:59Z")

</div>

Hi everyone, I’m trying to work with the “if” node for lists, but when I input the list, in the cases it would be false the output is the list itself, and not the item that is returning false.

I understand this is the intended behaviour but is there a workaround to get the actual value? Searching a little bit I’ve seen people recomend the “if” node from zebra or similar packages but I wanted to avoid too many custom nodes.

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

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [September 12, 2025, 12:30pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/2 "2025-09-12T12:30:14Z")

</div>

IF is an Imperative approach. In Dynamo, while working with lists, try to avoid IF

You could use _List.FilterByBoolMask_ Instead

 ![20250912-1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/5/4581a20c32c541085e8f95a841ef4ba5c3eeb895.png)

---

<div class="post-metadata">

**Author:** ![DevinLJackson](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@DevinLJackson](https://forum.dynamobim.com/u/DevinLJackson)\
**Post date:** [September 12, 2025, 12:43pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/3 "2025-09-12T12:43:05Z")

</div>

What are you trying to accomplish? That might help provide a better answer for what you are looking for.

It seems like you want to return any values over 0.5 and replace any values lower than 0.5 with 0.5? Here would be one way to do that.

 ![TruncateToNumber](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/2/e2c92248ccded434c4aa5c7fcef812d1a9a8c618.png)

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [September 12, 2025, 1:15pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/4 "2025-09-12T13:15:45Z")

</div>

There is some jiggery pokery going on with your _If_ node as there are some nested lists  
Try and get you lists flat and then use a design script comparator - or - nodes

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

---

<div class="post-metadata">

**Author:** ![hayet.sassi2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hayet.sassi2/32/199553_2.png) [@hayet.sassi2](https://forum.dynamobim.com/u/hayet.sassi2)\
**Post date:** [September 12, 2025, 1:28pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/5 "2025-09-12T13:28:48Z")

</div>

![Home_2025-09-12_03-26-42](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/1/91faddeb7ab7007840d625676abb6665fa581125.png)  
Hello, you need to filter your list first, then use an `if` condition. Also, make sure to set the list level properly

---

<div class="post-metadata">

**Author:** ![hayet.sassi2](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hayet.sassi2/32/199553_2.png) [@hayet.sassi2](https://forum.dynamobim.com/u/hayet.sassi2)\
**Post date:** [September 13, 2025, 11:42am UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/6 "2025-09-13T11:42:41Z")

</div>

Hello! Could you please tell me which package you use to organize your nodes like that? Thank you!

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

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 13, 2025, 12:56pm UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/7 "2025-09-13T12:56:06Z")

</div>

This is a built in feature.

Pins were introduced in Dynamo 2.13 - more here: [Dynamo Core 2.13 Release - Part 1/3 - Dynamo BIM](https://dynamobim.org/dynamo-core-2-13-release-part-1-3/#:~:text=Node%20selection%20paradigms%2C%20Notes%20and%20Wires%20have%20also%20been%20given%20a%20new%20lease%20on%20life%2C%20enabling%20better%20ways%20for%20you%20to%20build%2C%20annotate%20and%20understand%20your%20graph.%20Hurrah%20for%20more%20tools)!

---

<div class="post-metadata">

**Author:** ![cchulia](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cchulia](https://forum.dynamobim.com/u/cchulia)\
**Post date:** [September 15, 2025, 6:46am UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/8 "2025-09-15T06:46:54Z")

</div>

Thanks for all the replies. Indeed this is what I’m looking to acomplish, filter and replace, not just filter. So I’ll try to follow this workflow, thanks!

PS: I tried to flatten the lists to get them to work with the “if” node as mentioned by @Mike.Buttery but seems it’s still not working and I hoped.

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

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [September 15, 2025, 8:11am UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/9 "2025-09-15T08:11:07Z")

</div>

You will need to adjust the list levels in the _If_ node

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/d/6d78b256d9ebca0c9e01637178b1042ad94d551d.png)

---

<div class="post-metadata">

**Author:** ![cchulia](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cchulia](https://forum.dynamobim.com/u/cchulia)\
**Post date:** [September 19, 2025, 10:03am UTC](https://forum.dynamobim.com/t/if-node-for-list/112322/10 "2025-09-19T10:03:46Z")

</div>

I had not considered that 🙈 , but yeah, it works, thanks!
