# Whay cant I filter using codeblock

**URL:** <https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108>\
**Category:** Revit\
**Tags:** revit, dynamo, listfilter\
**Created:** [November 7, 2021, 7:45pm UTC](https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108 "2021-11-07T19:45:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ykl.arq](https://avatars.discourse-cdn.com/v4/letter/y/c0e974/32.png) [@ykl.arq](https://forum.dynamobim.com/u/ykl.arq)\
**Post date:** [November 7, 2021, 7:45pm UTC](https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108/1 "2021-11-07T19:45:12Z")

</div>

I want to filter my list by Uniclass fields but when i try to use == node it dosent work, it works only if I have the number of item “Field” index ,but i need to use this script for other models which doesnt have the same index, that is the reason that I want to filter by name

 ![Imagen-b](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/1/41db6944548e068beb73cab630f40aa0afff96b9.png)

Thanks for your help

---

<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:** [November 7, 2021, 9:27pm UTC](https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108/2 "2021-11-07T21:27:16Z")

</div>

I think you might be comparing the name to the object. Said another way: My name is Jacob, but I am not equal to Jacob.

Try turning the object into a string using a String.FromObject node (or try `obj+””==target;` in a code block)

---

<div class="post-metadata">

**Author:** ![ykl.arq](https://avatars.discourse-cdn.com/v4/letter/y/c0e974/32.png) [@ykl.arq](https://forum.dynamobim.com/u/ykl.arq)\
**Post date:** [November 8, 2021, 1:12pm UTC](https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108/3 "2021-11-08T13:12:57Z")

</div>

Thks!! it works!!

---

<div class="post-metadata">

**Author:** ![ykl.arq](https://avatars.discourse-cdn.com/v4/letter/y/c0e974/32.png) [@ykl.arq](https://forum.dynamobim.com/u/ykl.arq)\
**Post date:** [November 8, 2021, 3:46pm UTC](https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108/4 "2021-11-08T15:46:57Z")

</div>

Maybe can use another short node or code, but now PLUMBING FIXTURE SCHEDULE FOR UNICLASS rutine it works.  
Maybe can u guide me with another ways to compress it

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

---

<div class="post-metadata">

**Author:** ![Robert\_Younger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/robert_younger/32/205603_2.png) [@Robert\_Younger](https://forum.dynamobim.com/u/Robert_Younger)\
**Post date:** [November 8, 2021, 8:19pm UTC](https://forum.dynamobim.com/t/whay-cant-i-filter-using-codeblock/70108/5 "2021-11-08T20:19:56Z")

</div>

Combine all of your string fields into a single list, then use the All Indices Of node with cross-lacing.
