List sorting / IF node / sort by Key...Stumped!

Ok fabulous forum folks, I’m stumped. This is probably something really simple. I want to get the elements from the list that have false listed below them into a list of just the elements so I can get and set parameters from them.

Thank you in advance!!!

if you want to filter them the use

List.FilterByBoolMask

I tried that a few different ways and it’s not giving me the correct info. I should have 7 elements in the end. Does the mask need to be more than just a boolean?

Start before the List.Transpose/List.Create, use the element list as the ‘list’ input and the true/false list as the ‘mask’ input.

try like this

1 Like

That work for what I needed!! Now to finish it.lol Thanks!!! Much appreciated.

1 Like

So you started with a list of elements and a list of corresponding true/falses per element. Then you combined those into a single list so it had the pairs element + bool.

Then you take them apart again to do the filterbyboolmask?

Why not just use the original two lists instead of combining them just to separate them? It seems like you are doing so much extra work for no reason.

You should read on how the FilterByBoolMask node works, it will help you in the future. Your example picture above isn’t working because the ‘mask’ input isn’t supposed to be a single boolean of what you want.

The mask input is a list of true or false that line up with the list input, so the first item in the list input is related to the first bool in the mask, and so on. Then you take the output of ‘in’ as the sublist where the elements have a corresponding ‘true’ value in mask and ‘out’ is for false.

Thank you for your comment. I will look into this. I’m fairly new at Dynamo and this was the most involved script I’ve written so far. I’m just glad I got it to work! lol
It is always better to work smarter not harder!

This might illustrate it better. Your problem is a good example of when and how to use FilterByBoolMask

1 Like

Thank you so much for this illustration! I knew I was overthinking this. And I really don’t /didn’t know how to use the FilterByBoolMask node. I really appreciate your time with this!!!

1 Like