Filter Elements by string

Each of these walls has a few materials. Each of these materials contain a specific string that i wrote in the keynote field of each material (“Bauelmente” in german) . My goal is to filter all the walls for these specific strings.
It seems easy but i can’t figure it out

You need to compare the material keynote values to your specified value to see which are the same. Then, because each element can have multiple materials, you need to find the sublists with any matching material value (since that would correspond to a single element). Then you can use that list of booleans to filter your list of elements with FilterByBoolMask.

Thanks Nick, but i am not really sure how set this up. But i found another solution that almost works for me. If any string of my list is inside my material keynotes, i get a true value. Is there a possibility to search for a value independently of its index, like if any of my strings is inside a list, i get a true value ? My problem here is that i don’t always get a true value although my list contains the string i am searching for

It’s the same process I described when dealing with multiple materials. You can check all your options independently and then confirm that any of those checks returned a true value. The key here is to make sure you conserve the original list structure.

However, there is a shortcut for specifically what you are asking for since you need any match to those values. You can instead use List.Contains to skip one level of comparing all values for a passing condition.

1 Like

That seems brilliant but i don’t know what’s wrong here

Set lacing to cross product. Right click List.Contains node and you will see that option

1 Like

works all perfect ! thank u guys !