How to replace all null with multiple values

hello, I have two lists that have corresponding null values that I need to splice together, but how do I replace multiple null values with the multiple (different values) for each null value. I want to have one full list, with only the values of these two lists. but need to retain their relative index positions no matter what. meaning if the nulls are in different indicies the next time i run it. Thanks!

use ReplaceItemAtIndex, and then give the value for that.

if you want to replace in an nD list, then try to see here.


please remember DanEDU er deprecated, use the equivalent from Orchid

2 Likes

Maybe something along the lines of this?

2 Likes

@mix See if this serves your purpose…

replaceNull.dyn (10.9 KB)

3 Likes

Hi erfajo,

I havent upgraded to orchid yet because I have so many scripts that require your DANedu nodes that it would be a pain to have to go back and try to fix them all. Because to get Orchid you have to remove the DANedu package. If your package had all the same nodes, left the same way then I might do it. But its working and I dont want to mess with it at this point. Plus, if I remember correctly, to get Orchid I had to update Dynamo itself to 2.0 and that in-and-of-itself messes even more stuff up. So unless you know of specific problems with your DANedu nodes that you would like to point out, then please forgive me for not updating at this time.

Hi @Dimitar_Venkov
Looks like i must be doing something wrong with your solution because it does not work for me. Please see below.

Thanks @Vikram_Subbaiah that is a very simple and eligant solution. I should have thought of that! Thanks!

1 Like

I support 1.3.x and 2.0.x environment, but yes you have to replace the nodes.

The nodes in Orchid are named the same but are now made as zero-touch nodes, meaning they are serialized in another way than custom nodes.

I will recommend you to upgrade since I don’t maintain the old anymore. When you at some point want to move on to 2.0.x version, then you need to update some of the nodes anyway, since they don’t support 2.0.x

If you change, will the same node be supported both in 1.3.x and 2.0.x since I have coded it in a way so both will be supported seamlessly.