FilterByBoolMasked return empty list

I do not know what I’m doing wrong, but in this case, the FilterByBoolMask node does not work as I wish.

This is what I want: I receive all the mechanical equipment and the name of their system and I have created a separate list with the group of short names of the system, so I want that if the name of the mechanical equipment system contains one of the names that missing to the list get only those whose value is true and at the end they establish a value for a type parameter. But, FilterByBoolMask only returns Empty List or returns all the mechanical devices without differentiating the system name.

The length of your list doesn’t correspond.

The true/false are only exist out of 4 and your input list exist out of 7. I think if you add the Anytrue node from clockwork between string.contains and the boolmask you get your result!

As hugo pointed out, the problem comes with the length of your lists, one is nested and contains 24 elements and the other is just 7. Try this workflow:

Work it perfectly.

Thanks for the solution

1 Like

Also, it would be quite easy to use a bit of python:

# The inputs to this node will be stored as a list in the IN variables.
mech = IN[0]
pci = IN[1]

result = []

# Place your code below this line
for el in mech:
	if el in pci:

# Assign your output to the OUT variable.
OUT = result