If node not working

Hello, I am having difficulty getting the if node to work in all instances. look at this example, why is it only accepting the first item for each? I need it to select both? wouldnt this be longest lacing? How do I do that in an if node? is there another node out there for this sort of thing? Thanks!

I’m guessing your True condition is a list of single items.

Similar to what you posted here. The If node requires list lengths to be equal.

This is often a struggle for people, and the work around is often a different data flow.

Perhaps a list.filter by book mask would work for you?

@Nick_Boyts yes actually it is the same thing but I cant figure out how to get it to work with sublists now. @JacobSmall yes that is the case, but what if the list lengths necessisarily need to be different, like in cases like this?

You can try ScopeIf or ScopeIf+ from Clockwork. I prefer the Clockwork node for these cases because it doesn’t actually use an If function but rather an indexing function to pull exactly what you want.

What is the reason for having to keep the list order as is? I would need to see the overall scope here to know for certain what’s best. Filtering by the bool mask will split the lists into two branches. You can combine them afterwards if needed.

If they have to stay as is then using a scopeif as @Nick_Boyts indicated is likely best.

Ok well scope if+ didnt work either, so what I did instead was take a boolean list and replace the values at index with two separate replace at index nodes connected in series. Its more convoluted, I know, but hey it works…
:slight_smile: