Remove list with all values empty - maintaining empty values of other lists

Hi All,

I am trying to remove a list which all indexes are empty and at the same time maintain the empty indexes of lists with values on them. So far I have only managed to remove all empty indexes:

Many thanks in advance.

Try this:

  1. Use a != node asking if each unique item is equal to an empty string. Make sure lacing is set to longest or levels are set correctly.
  2. Then ask if all items are true with a list.alltrue node or a list.contains node looking for false. Again, watch lacing/levels. You should now have a boolean for each sublist.
  3. Use that boolean list as a mask input on a list.filterbyboolmask node.

Hi,

Many thanks for the reply.

I have tried the proposed, however instead of giving the lists with values on them (and removing the lists which all indexes are empty) it appears to keep the first list only. Please see below:

I might be doing something very basic wrong as I haven’t been long working on Dynamo, but any help is welcomed.

I think you lacing/levels might be off in the picture you have shown. Could you try to change the levels of AllTrue to level 2 or use a List.Map? Or just check that it has been set by looking at the output from your “AllTrue” node. See attached image.

1 Like

Hi, you can simply use the node called “Flatten”, it removes all the empty data and reorganize them in a single list. You can manage the way it orginize it playing with the little @
image

1 Like