List filtering issue


#1

Hello all,

I am trying to isolate floor element(s) from a list, that match a floor type in the project. Trying to use list.map and list.FilterByBoolMask - but unable to receive the expected output …

 

 

 

 

 

The red marking on the left, illustrates where element type corresponds, and the false value marked on the right is where I would expect it to be “true” ?

Any suggestions on what I am doing wrong ? Isn’t this how list.map and bool filter is supposed to work ?

 

Thanks,


#2

I’m not a big expert on the List.map, but from what i’ve experienced i think the issue is that your element.type list contains sublist of some length, and your floor type list is a much longer list. so the list.map node will compare the index of the two diffrent list, but since your element.type list only contanis 5 elements, it will only apply the function from the 5 first elements in the floor types list. see picture:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Another way of achieving what you are after could be like this:


#3

Argh, it was so obvious. I tried to run at list[6] against a list[16]. Of course it returned false.

In regards to your proposed solution, i’ve already used that previously - so i guess i’m using that again. Just thought the list.map was a nice solution (if it worked).

Problem solved:

Previous use:

Thank you for the guidance :slight_smile: