Empty List handling

Hello, I have a list that is sometimes empty and sometimes not that i want to populate into a sum equation. if its empty, I want the value to be zero, so that it can actually calculate the sum. Right now since it is empty, the sum equation is failing I tried to build in an empty list handler but its not working. What am i doing wrong?
Thanks!
image

Clockwork has a node called List.ReplaceEmptyLists that should work

Thank you for the idea. However, its not working…

Try this in a code block:

List.Count(a)>0?
a:
0

@jacob.small
That doesnt work either. So how does one handle empty lists if they always infect anything downstream of them?

Can you share your entire graph, and provide some background on what you’re doing with the overall graph? You need to stop the issue earlier in the process, at the point when the empty list first shows up as once it happens you’ll be fighting it in every node thereafter.

How about this?


(Custom Node is from Clockwork)

1 Like

@Andreas_Dieckmann
I was skeptical that that node would work, since you were not feeding any empty lists directly into it like I need to, but it turns out it works! MUCH appreciated!