HI there,
I've got a feature layer (78,000 rows), and in a few columns I need to do some replacing. There are "A", "B", "B1", "B2", "C" and "D" values. I need to replace every "B" to a "B1". I've opened up the feature layer in ArcGIS online, and gone to the data tab. The I click on the column header, and hit calculate. I'm, then going into arcade and writing the following;
Replace($feature.Birds, 'B', 'B1')
This does replace all the B's, but unfortunately the "B1" values become "B11", and "B2" becomes "B12". Is there a way to restrict it so that it will only replace the lone B values, not when they're in a B1 or B2? I'm just getting started with this, and my knowledge of the syntax isn't great.
Any help would be appreciated!
Solved! Go to Solution.
You can test whether the value is "B" then replace it.
if ($feature.Birds == 'B') {
Replace($feature.Birds, 'B', 'B1')
}
You can test whether the value is "B" then replace it.
if ($feature.Birds == 'B') {
Replace($feature.Birds, 'B', 'B1')
}