List Contains not giving the correct answer

Hi all,
I’m trying to make a dynamo script that will cross-reference an excel sheet with the families loaded within a project.
I’m having trouble with the List contains giving the correct answer / matching the two list meaning I can’t get an accurate bool mask.
Please help!
FYI I’ am a little trial and error with dynamo so I could definitely be going about this all the wrong way

load_families_excel.dyn (52.7 KB)

@sparkyduke , hi

be aware when you filter elements by mask… they have the same count!

i think you have to use transpose … to fit your input.



That might pose an issue. What im hoping to do is check my projects loaded families against a large list, so they will never be the same count. How can I check a small list against every line in a longer list to return a True value when they match. Is that something that can be done?

Hello @sparkyduke …not sure but how about a way with "all indicies ?


Hey @sovitek .
Look like List.AllIndices need to be a number I,m working with Strings

Though I seem to be having a bit of success using List Filter by String Nodes

The Issue now is that I have 16 elements on the list, which is the other strings returning false under each list.
Is there a node/way to compress that and have the 4 returns only [False,True,False,True]
00 load_families_excel.dyn (50.7 KB)

here is a potential lead



Hello instead of string from object just get the name of the family and compare

1 Like

For this one try to change lacing then add List.AnyTrue node.

Hey @truevis, you nailed it cheers.
Setting list.AnyTrue with longest lacing worked a treat.

1 Like