# List and item

**URL:** <https://forum.dynamobim.com/t/list-and-item/40397>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [September 6, 2019, 11:48am UTC](https://forum.dynamobim.com/t/list-and-item/40397 "2019-09-06T11:48:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![natrada.bo](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@natrada.bo](https://forum.dynamobim.com/u/natrada.bo)\
**Post date:** [September 6, 2019, 11:48am UTC](https://forum.dynamobim.com/t/list-and-item/40397/1 "2019-09-06T11:48:08Z")

</div>

Hello; I want someone to help me, please  
In a dynamo, I found a problem, I have 2 lists; One has got 50 items and 52 items respectively or some it alternates so I have to choose always 52 items. How I have to do?

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 6, 2019, 11:51am UTC](https://forum.dynamobim.com/t/list-and-item/40397/2 "2019-09-06T11:51:57Z")

</div>

Lacing \> Longest?

---

<div class="post-metadata">

**Author:** ![natrada.bo](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@natrada.bo](https://forum.dynamobim.com/u/natrada.bo)\
**Post date:** [September 6, 2019, 12:02pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/3 "2019-09-06T12:02:07Z")

</div>

but…when I choose like that, in List.LaceLongest is “null” look like this picture How?.

 ![Screenshot%20(2)](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/7/b7f3657bacd73aee7e9a4d3a05d62fd3eb2de4be.png)

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 6, 2019, 12:06pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/4 "2019-09-06T12:06:32Z")

</div>

try this  
the first list is a list of lists.  
Flatten it first or choose list@level 2  
second you’ll need to provide a combinator like ==

---

<div class="post-metadata">

**Author:** ![natrada.bo](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@natrada.bo](https://forum.dynamobim.com/u/natrada.bo)\
**Post date:** [September 6, 2019, 12:16pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/5 "2019-09-06T12:16:38Z")

</div>

please, some example ^^

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 6, 2019, 12:21pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/6 "2019-09-06T12:21:39Z")

</div>

i cant help you with an example  
i don’t have Dynamo on this computer.  
sorry

---

<div class="post-metadata">

**Author:** ![natrada.bo](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@natrada.bo](https://forum.dynamobim.com/u/natrada.bo)\
**Post date:** [September 6, 2019, 12:35pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/7 "2019-09-06T12:35:54Z")

</div>

your welcome, thank you so much

---

<div class="post-metadata">

**Author:** ![Marcel\_Rijsmus](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/marcel_rijsmus/32/8539_2.png) [@Marcel\_Rijsmus](https://forum.dynamobim.com/u/Marcel_Rijsmus)\
**Post date:** [September 6, 2019, 6:26pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/8 "2019-09-06T18:26:45Z")

</div>

i want to invite some other guys to help you out

---

<div class="post-metadata">

**Author:** ![natrada.bo](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@natrada.bo](https://forum.dynamobim.com/u/natrada.bo)\
**Post date:** [September 7, 2019, 3:12am UTC](https://forum.dynamobim.com/t/list-and-item/40397/9 "2019-09-07T03:12:18Z")

</div>

ok. Thak you so much

---

<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 7, 2019, 3:28am UTC](https://forum.dynamobim.com/t/list-and-item/40397/10 "2019-09-07T03:28:47Z")

</div>

I don’t have your data set, so I cannot confirm, but I think that the reason you have 50 items in the first list is that empty lists don’t count as items.

When you replace the empty lists with an item (in your case a 0), you now have something which is counted, ergo you wind up with a larger count.

---

<div class="post-metadata">

**Author:** ![natrada.bo](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@natrada.bo](https://forum.dynamobim.com/u/natrada.bo)\
**Post date:** [September 7, 2019, 3:36am UTC](https://forum.dynamobim.com/t/list-and-item/40397/11 "2019-09-07T03:36:53Z")

</div>

When I replace the empty lists with number other than 0, all is the list are still ‘null’.

---

<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 7, 2019, 1:01pm UTC](https://forum.dynamobim.com/t/list-and-item/40397/12 "2019-09-07T13:01:00Z")

</div>

What lists are you referring to? I’m a bit lost here, perhaps the original question wasn’t clear.

Can you post the dyn and any other required files (Revit, excel, etc) to run it, and a an image showing the preview of what you have and markups showing what you want.

Thanks.
