I am wanting to replace an empty list with ‘0’ and I found this thread →
but the ReplaceEmptyList node shows null.
My final list shows the empties being '0’s so maybe it doesn’t matter, but my final list also shows my complete list in both instances instead of showing the individual numbers. I probably didn’t explain that very well, here is a screenshot.
That’s actually a bad example in the post you linked. The only reason it works there is because there was only one non-empty list. The issue here is that you’re pre-filtering the empty lists. So your If statement doesn’t really align anywhere now.
You have four test conditions (four sublists) so you want four values for true and four values for false. Then you need to align those inputs via list levels.
Yeah, I wouldn’t expect it to work like that. It would have to be recursive to find an empty at any level and I don’t think that’s ever going to be what someone is looking for. Would be an odd scenario where structure is irrelevant.
My original comment was at the example given in the linked post. Filtering the empties and using List.Map only “worked” because there was only one existing value to return.