# List Management Manage List Indices

**URL:** <https://forum.dynamobim.com/t/list-management-manage-list-indices/36157>\
**Category:** Lists-Logic\
**Tags:** dynamo\
**Created:** [May 19, 2019, 2:04pm UTC](https://forum.dynamobim.com/t/list-management-manage-list-indices/36157 "2019-05-19T14:04:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arun\_Prakash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arun_prakash/32/89820_2.png) [@Arun\_Prakash](https://forum.dynamobim.com/u/Arun_Prakash)\
**Post date:** [May 19, 2019, 2:04pm UTC](https://forum.dynamobim.com/t/list-management-manage-list-indices/36157/1 "2019-05-19T14:04:26Z")

</div>

Hi Fellow Dynamo users,

I came across a situation where i need to know the number of cylinders in wall and slab.  
Im trying to group them by,

wall type 1  
no of cylinders 20

wall type 2  
No of cylinders 8

Screen Dump,

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

ISSUE IS HOW DO I MAKE IT MORE EASY BY REMOVING THE EMPTY LISTS IN BETWEEN AND STILL PRESERVING MY INDICES?

---

<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:** [May 19, 2019, 3:27pm UTC](https://forum.dynamobim.com/t/list-management-manage-list-indices/36157/2 "2019-05-19T15:27:32Z")

</div>

Hard to solve with the data you posted. Use the image export (camera button on the top right corner of the screen) so we have a complete view.

My guess is that you need to sanitize your data before you combine it. I would first Flatten your list of cylinders before you combine it with the list of walls. Make sure lacing is set correctly. Once that is done you should have a list for each wall, some of which may be empty lists. Then use a List.AddItemToEnd to join the data.

---

<div class="post-metadata">

**Author:** ![Arun\_Prakash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arun_prakash/32/89820_2.png) [@Arun\_Prakash](https://forum.dynamobim.com/u/Arun_Prakash)\
**Post date:** [May 19, 2019, 3:34pm UTC](https://forum.dynamobim.com/t/list-management-manage-list-indices/36157/3 "2019-05-19T15:34:32Z")

</div>

These are my 2 lists that I need to group,

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

I need something like,

Wall1  
Cylinder1  
Cylinder2

Wall 2  
Cylinder1  
Cylinder3

basically these are geometry intersections which I want to count per wall.  
So in each wall I need to count the intersections.  
later by slabs.

Finally I need the count based on Family type.

wall type 1  
no of cylinders 3

Slab Type1  
no of cylinders 12, etc.

---

<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:** [May 19, 2019, 4:54pm UTC](https://forum.dynamobim.com/t/list-management-manage-list-indices/36157/4 "2019-05-19T16:54:29Z")

</div>

Flatten the lists of cylinders at level 3 - you should get just a list of cylinders per wall, my levels may be off.

List.Count at level 2. That’s the count per wall/slab (assuming your list structure matches - I can’t tell with the smaller section of the graph).

---

<div class="post-metadata">

**Author:** ![Arun\_Prakash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arun_prakash/32/89820_2.png) [@Arun\_Prakash](https://forum.dynamobim.com/u/Arun_Prakash)\
**Post date:** [May 19, 2019, 5:41pm UTC](https://forum.dynamobim.com/t/list-management-manage-list-indices/36157/5 "2019-05-19T17:41:42Z")

</div>

It worked, thanks @jacob.small
