# Get specific item from list

**URL:** <https://forum.dynamobim.com/t/get-specific-item-from-list/68145>\
**Category:** DesignScript\
**Tags:** dynamo, list-filter\
**Created:** [September 13, 2021, 2:23pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145 "2021-09-13T14:23:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [September 13, 2021, 2:23pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/1 "2021-09-13T14:23:21Z")

</div>

![Screenshot 2021-09-13 101257](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/7/77628bc7a4c4b0fd57e185d53589f5fb147a1cef.jpeg)

Hello everyone, I am currently trying to automate NWC Exports with this script. It seems to be working fine the only issue is that I have to select “index” number and I was wondering if there was a way I could just type in the view specific name so that it could just select that view without having to find the number.

For example finding “3D\_NWC EXPORT” in the list and being able to use that as my index?

Not sure if there’s anything I could do with that but please let me know, I’ve been trying to find something with no luck. Thank you!

---

<div class="post-metadata">

**Author:** ![NickDodge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nickdodge/32/99479_2.png) [@NickDodge](https://forum.dynamobim.com/u/NickDodge)\
**Post date:** [September 13, 2021, 2:30pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/2 "2021-09-13T14:30:24Z")

</div>

If you are consistently looking for a the same or similar name on the view you could use a string contains node to search the specific name you want. you might use a list.first item to make sure you only get just one item when you are searching. hope this helps.

---

<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:** [September 13, 2021, 2:31pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/3 "2021-09-13T14:31:19Z")

</div>

Absolutely. You would just have to compare the specified view name with the list of returned view names. You can either use a boolean mask to filter out the one view you need or compare indices and get the view with the specified index.

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [September 13, 2021, 2:46pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/4 "2021-09-13T14:46:03Z")

</div>

![Screenshot 2021-09-13 104344](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/e/8efae9bd5b00ef1daf3fceb2d10eb818409e7471.jpeg)  
Nick, thank you for the quick reply. I tried doing something like this. Im assuming I did not attach the right string to the “string.contains” node because everything comes up as null.

Let me know if you have any suggestions, thank you!

---

<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:** [September 13, 2021, 2:50pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/5 "2021-09-13T14:50:58Z")

</div>

You have to compare it against another string - in this case, the view names. `String.Contains` returns a boolean, not an index, so you would use `FilterByBoolMask` to filter the view elements that way.

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [September 13, 2021, 3:27pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/6 "2021-09-13T15:27:43Z")

</div>

![Screenshot 2021-09-13 112700](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/7/e7335d751b489e7150f999a5c8c11f24968f64ee.jpeg)

Am i plugging in the right components?

---

<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:** [September 13, 2021, 4:08pm UTC](https://forum.dynamobim.com/t/get-specific-item-from-list/68145/7 "2021-09-13T16:08:27Z")

</div>

`FilterByBoolMask` filters elements based on a list of true/false values. You could use `String.Contains`, but `==` would be better. You would still have to compare against the view name (`Element.Name`) not just the view. Try looking for examples of `FilterByBoolMask` in the forum. It’s a very common workflow.
