# Not full list after If function

**URL:** <https://forum.dynamobim.com/t/not-full-list-after-if-function/12224>\
**Category:** Lists-Logic\
**Created:** [June 2, 2017, 9:40am UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224 "2017-06-02T09:40:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![antoshka\_2012](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@antoshka\_2012](https://forum.dynamobim.com/u/antoshka_2012)\
**Post date:** [June 2, 2017, 9:40am UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/1 "2017-06-02T09:40:19Z")

</div>

Hello!

I am newbie in Dynamo and in programming, but diligently read Dynamo’s help and forum. I have issue that I could not find in both ones. So…

I have list of numbers which after checking through IF function loose last number. How to fix it?

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

---

<div class="post-metadata">

**Author:** ![Mohammadz](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mohammadz/32/22398_2.png) [@Mohammadz](https://forum.dynamobim.com/u/Mohammadz)\
**Post date:** [June 2, 2017, 11:29am UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/2 "2017-06-02T11:29:38Z")

</div>

hmmm… try writing it like this

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/0/f/0f0c0968e36f356ae51ab06118007519ae82db8f.PNG)

---

<div class="post-metadata">

**Author:** ![antoshka\_2012](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@antoshka\_2012](https://forum.dynamobim.com/u/antoshka_2012)\
**Post date:** [June 2, 2017, 12:07pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/3 "2017-06-02T12:07:20Z")

</div>

It doesn’t work either. I also tried through formula function, but result is the same.

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

---

<div class="post-metadata">

**Author:** ![EzDoesIt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ezdoesit/32/70125_2.png) [@EzDoesIt](https://forum.dynamobim.com/u/EzDoesIt)\
**Post date:** [June 2, 2017, 12:13pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/4 "2017-06-02T12:13:44Z")

</div>

try yo set == lacing to longest

---

<div class="post-metadata">

**Author:** ![antoshka\_2012](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@antoshka\_2012](https://forum.dynamobim.com/u/antoshka_2012)\
**Post date:** [June 2, 2017, 12:27pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/5 "2017-06-02T12:27:06Z")

</div>

Nothing changed (

---

<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:** [June 2, 2017, 3:29pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/6 "2017-06-02T15:29:55Z")

</div>

Check to make sure your True and False input lists are of equal length.

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [June 2, 2017, 4:33pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/7 "2017-06-02T16:33:20Z")

</div>

…or use `ScopeIf` node:  
 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/9/b94ec5f054bd26eb6ca94bf5508da1901d640f92.png)

The `If` node is designed output rectangular arrays, or arrays if a singletons and array are input (same rule applies for ternary operators). In your case the shorter list defines the list length, hence the ‘missing’ object.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/f/df2e68a2d52ccfed4c9bc21686a68fbb131f1bcb.jpg)

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

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [June 2, 2017, 6:00pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/8 "2017-06-02T18:00:39Z")

</div>

This has been discussed with the Dynamo Team on github here:

> <https://github.com/DynamoDS/Dynamo/issues/6258>

  
Maybe you should ask there if they have made any progress…

---

<div class="post-metadata">

**Author:** ![antoshka\_2012](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@antoshka\_2012](https://forum.dynamobim.com/u/antoshka_2012)\
**Post date:** [June 2, 2017, 6:45pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/9 "2017-06-02T18:45:07Z")

</div>

Oh… Thank You! I will try ScopeIf.

---

<div class="post-metadata">

**Author:** ![jostein\_olsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jostein_olsen/32/8570_2.png) [@jostein\_olsen](https://forum.dynamobim.com/u/jostein_olsen)\
**Post date:** [June 2, 2017, 7:19pm UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/10 "2017-06-02T19:19:57Z")

</div>

I have sometimes recieved null values when using ScopeIf, but I haven’t tested it since it was reported a long time ago. I have used a designscript version similar to the one proposed by @Andreas_Dieckmann in the link @Einar_Raknes posted, like so:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/7/17d2b3256d82d96971a2913b41d1b4bae637cefb.gif)

---

<div class="post-metadata">

**Author:** ![antoshka\_2012](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@antoshka\_2012](https://forum.dynamobim.com/u/antoshka_2012)\
**Post date:** [June 5, 2017, 7:17am UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/11 "2017-06-05T07:17:13Z")

</div>

ScopeIF gives error. I don’t know what this mean.

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/3/c/3cc445e79a973efede4f4812decf5cef5a7fb3b3.png)

---

<div class="post-metadata">

**Author:** ![antoshka\_2012](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@antoshka\_2012](https://forum.dynamobim.com/u/antoshka_2012)\
**Post date:** [June 5, 2017, 7:22am UTC](https://forum.dynamobim.com/t/not-full-list-after-if-function/12224/12 "2017-06-05T07:22:56Z")

</div>

Thank You! This block works best of all.
