Comparing multiple lists with one list using the && node


I’m trying to filter a list of views by multiple criteria, and then add the results using the && node.
When I pass the same list four times for the && node to compare with another list, it fails to get any true values for some reason.

Looks like your lists in your transpose node is inside another list compared to the ones in your “==” node.

This will probably cause the error, try changing the “list level” on your “&&” node x-input.

A simplified version of your graph.

Ah, good catch! Though the next problem is that it’s not giving me the result (views) that I’m looking for.
Is there possibly an error in my list logic somewhere?
The number of true values ends up mostly correct (I verified in Revit). I don’t know if that’s just coincidence, but the filtered views at the end are not the ones I want.

Yea… You have a mask of 3300 (true/false) values and a list of “only” 825 values… Comparing these will probably give you some troubles if you don’t mind the list levels.

Mind you I changed the lacing back to “shortest”

1 Like

Hmm, that seems better. Though it’s still only catching the views with “- A” in them, but not B or C or D.

Edit: Never mind, I forgot I was passing the result of the && node through a flatten. Passed it directly and it worked perfectly!

1 Like

I would actually do something like this

1 Like

Don’t forget to mark a comment as the solution to your problem. :slight_smile:

I didn’t quite get what you did there. I tried it out, but it didn’t work.

I think the reason is that I’m looking for EITHER A or B or C or D, not all of them together? But maybe I’m wrong.

ups, yeah that’s actually wrong for what you want to achieve. My bad :sweat_smile: