Swap empty main list

While I can easily manage replacing lists if there are any lists, I can’t seem to swap to another list structure if no list is present.

Basically I have two multidimensional lists: A and B.
I want to continue with B, unless A is not empty. (A is often empty)

Using any of the replace list nodes gives exactly the same result, “empty”.

This could help:

Yes but you never return Y, the empty list.
Once it’s in the last part of the equation ? z : x => ? y : x The node keeps returning Empty list, even if it’s supposed to return x

The empty list y was supposed to replace a 0 value from List.Count, which seems to cause a trouble. But I see now that, if list x is empty too, the statement returns “empty” indeed, and do not list z as expected. Seems like a bug…

Hi @Wouter_Vandebergh ,

if you create a function and declare your inputs as lists it will work :

3 Likes