If condition with empty list not passing

Hi, If the list is empty (True) I’m trying to pass another. If it isn’t (false) I want to pass that one. Not sure I understand if conditions correctly though.

Im sure im using it right testing this below

Completely correct but unfortunately the If node has its quirks:

1 Like

This gets a little complicated I think…

So if I incorporate the scope if node to determine if im passing through a list that has or hasnt intersected with floors. The whole thing errors out and throwing nulls backwards.

If I pass through a list that has no scope if and is either a intersecting list or none intersecting list it works fine if that makes sense. Below is the yellow connections that would work.

This is just the sea of nulls back to collecting floors to see if the point intersects if I use ScopeIF

Just connecting that destroys all with the backwards null thing

Something like this might help.

lstAll = [lst1,lst2];
List.Count(lst1) >= 1 ?
lstAll[1] : 

Idea is to just combine both into one list and use list indexing as the changing value in your if statement, allowing you to pull the first or last value accordingly.

1 Like

woho! Thanks Jacob. Not sure if this is what you meant but below is the interpretation of what I got from you. But it does the trick cleanly :slight_smile: