Select to view content in your preferred language

Why do I get a bad value error when I ran Calculate Field

164
4
Friday
PROBERT68
Honored Contributor

As I type the word Replace in the field using Calculate field to replace the I- to 255, however I get this error message. Has anyone went through this error and got it to fix ?

PROBERT68_0-1748622919438.png

I looked at the Text Functions on ArcGIS Arcade in the ESRI Developer exactly but do not know why... Maybe some of you can help me out...

PROBERT68_1-1748623157471.png

 

 

0 Kudos
4 Replies
JoshuaBixby
MVP Esteemed Contributor

You have $feature.SignSymbols wrapped in quotes, which makes it a string and not a reference to the feature.

PROBERT68
Honored Contributor

So should I say or type it in as   Replace($feature.SignSymbols, "I-", "22")  ?  

0 Kudos
Joshua-Young
Frequent Contributor

Won't the Replace function create a new value of "225225"? Is the goal to remove the "I-" and just have a value of "225"? Could you just select all the features with a sign symbol of "I-225" and do a simple calculation of "225" as the new value?

"Not all those who wander are lost" ~ Tolkien
0 Kudos
PROBERT68
Honored Contributor

Actually the workaround I did was to use the select by attributes and then open the attributes in the selection menu and in the Attribute dialog box .  Click at the layer name and then go down to the field and type that number....

0 Kudos