Replace in list By Condition

Hello! i want to replace all instances of this list with a “o” string if the value is not “-1”, can anyone help out?

Kind Regards :slight_smile:

A simple if statement in a code block will do: val == “-1”? v: “o”;

3 Likes

hello


Mr. Jacob’s solution is more efficient
cordially
christian.stan

2 Likes

This worked! Thank you so much!

1 Like

It’s definitely more efficient

(if you ever had trouble writing)

cordially
christian.stan

1 Like

I am still new to Dynamo, having trouble to write in code block :slight_smile:
Thank you so much!

1 Like

Thank you so much!

3 Likes

Thanks a bunch! i will be checking it out!