# If-Statement Issue

**URL:** <https://forum.dynamobim.com/t/if-statement-issue/13197>\
**Category:** Packages\
**Created:** [July 14, 2017, 4:03pm UTC](https://forum.dynamobim.com/t/if-statement-issue/13197 "2017-07-14T16:03:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge\_Villarroel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jorge_villarroel/32/23619_2.png) [@Jorge\_Villarroel](https://forum.dynamobim.com/u/Jorge_Villarroel)\
**Post date:** [July 14, 2017, 4:03pm UTC](https://forum.dynamobim.com/t/if-statement-issue/13197/1 "2017-07-14T16:03:36Z")

</div>

Hi All,

I have the following issue. I think the image is sefl-explainatory:

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

Why “IF” doesnt take my list of 9 elements?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Jorge\_Villarroel](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jorge_villarroel/32/23619_2.png) [@Jorge\_Villarroel](https://forum.dynamobim.com/u/Jorge_Villarroel)\
**Post date:** [July 14, 2017, 4:05pm UTC](https://forum.dynamobim.com/t/if-statement-issue/13197/2 "2017-07-14T16:05:16Z")

</div>

I’m using it like an “Error Catcher”:

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

---

<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:** [July 14, 2017, 7:45pm UTC](https://forum.dynamobim.com/t/if-statement-issue/13197/3 "2017-07-14T19:45:19Z")

</div>

You are feeding a single bool so the node is pulling the one false test not 9 tests and therefore gives you the single list depth. Set the lacing in the test node to longest. 🙂

---

<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:** [July 14, 2017, 8:56pm UTC](https://forum.dynamobim.com/t/if-statement-issue/13197/4 "2017-07-14T20:56:50Z")

</div>

You’ll most likely also want to match your list structures between true and false. You can do this by chopping your polycurve list by a length of one (1).

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