Replace blank value in list

Pretty new still to Dynamo. I am moving the values in one parameter field to a different parameter field. This is working. However, I also need to replace all the blank values in the original field with a custom value in the new field. I am trying to use List.ReplaceEmptyLists, but that does not seem to be working. Would appreciate any help.

You can check the list if the value is blank, then use that true false list to filter your original list.

Thanks bmsewell. So I filtered the list as you suggested and that works. However, now when I go to set the parameter by name it is giving me an error. I feel it is because I am not defining the Element properly. I think I need to pull the elements and the values from the two lists independently but no sure how to filter to do that. Thanks.

There are several packages dealing with the same problem as yours, including the package I manage. The node in my package (DanEDU Dynamo) replaces empty list, null, blank and 0 values with a user driven input. There is also a node which removes empty list, null, blank and 0 values.

Thank you both. Here is a clean view of the solution.

Dear erfajo,

I am a total beginner with code therefore I am a bit in trouble trying to use the code for replacing list. I did manage to use the Cleanlist code but I can’t figure out the issue with the replacelist… Could you give me a hint ? I believe it is quite simple and I am just not using it properly…

Also I coulnd’t find your package on dynamo packages.

Thank you for your help

I have just tried to test if my package was there… and it was. However, you need to download the content from Github since the package at the packagemanager site is only a placeholder package.

See here for more info

I have nodes for cleaning and replacing in the package, try these if the OOTB nodes doesnt do the job.