List Hierarchy

Hello all,

i got some problems with the list hierarchy. i want to get true entries for the 5th and 6th element in the first list for a bool mask. Unfortunately i only get the 5th element.

thanks in advance
greetings
Kev

1 Like

@KevSch ,

you can try also list.contain

check also your listlevels @L

KR

Andreas

You can also add after you == nodes a List.Transpose to flip the XY columns, and then add a List.AnyTrue node :slight_smile:

@Draxl_Andreas
list.contains gives me still the same problem :confused:

@solamour
like so? i think my problem is not about flipping the columns - i don´t get the script to check after other elements from the second list :confused:

@KevSch ,

i was aiming this

be aware of lacing the longest

or this way, if there are just these 2 values

KR
Andreas

Your lacing is incorrect. Using @L2 for x and @L1 for y is saying “compare the list @L2 for x with the value @L1 for y”. However, you only have one list @L2 for x so you only get the one comparison. Instead, use just @L1 for y. This will compare each value in y individually against the list in x. Then you can transpose.

Or you can use @Draxl_Andreas’s suggestion of List.Contains, again, with the correct @L1 lacing to force each value in list to each item. Keep in mind, when using List.Contains to check for specific items you want the list input to be the values to look for.

This is also a great place for an OR condition (assuming you only have the two values to check for).

5 Likes

thanks @all
i finally got it, through the correct lacing of the lists as you suggested @Nick_Boyts :slight_smile:

1 Like