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.

1 Like

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.

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