Select to view content in your preferred language

Calculate New Combo Box Field on Existing Features

203
2
Jump to solution
03-06-2025 03:37 PM
DelaneyMarich
New Contributor

I have been tasked with adding a combo box field to every layer in my organization's GIS map to show if a feature is "active" or "abandoned". All of the features logged thus far are active and need to reflect this. Given that the number of features totals well into the thousands, I would like to not have to change this field to "active" for each individual feature. Making "active" the default value does not change the field on existing features. Is there a way to calculate the field in each layer to say "active" rather than be blank?  These features must have Sync and Keep Track of Features enabled, so the expression would need to be in SQL. I am still pretty new to ArcGIS so my apologies if this is a really simple answer that I am missing.

Thanks in advance!

0 Kudos
1 Solution

Accepted Solutions
MErikReedAugusta
MVP Regular Contributor

If I'm understanding your needs correctly, there are multiple ways to skin this bird.

One of the easiest would actually involve ArcGIS Pro, and I think it should still work with Sync & Keep Track of Features:

  1. Open an empty project in ArcGIS Pro
  2. On the Catalog Pane, navigate to the "Portal" tab
  3. Search for your web map, and open it
  4. Select all of the assets on the layer in question
    • N.B. If you have any queries on that layer, you might want to temporarily disable them for the moment, just to make sure your default value gets written to every asset.
  5. Open the Attribute Pane
  6. In the tree view section at the top, if you click on the name of the Layer, instead of a single asset, you'll be able to change values for everything.
  7. Find the field in question and just change the value.  This might take some time, depending on your connection.
  8. Save your edits
  9. Close the project.  You don't need to save it unless you want to; we shouldn't need it anymore.

All of the assets should have the new default value.

 

You could also use the Field Calculator from inside Pro, and then you get your choice of Arcade or Python 3 (or maybe Visual Basic?  Can't remember if it's still in Pro, because I avoid it like the plague).

------------------------------
M Reed
"The pessimist may be right oftener than the optimist, but the optimist has more fun, and neither can stop the march of events anyhow." — Lazarus Long, in Time Enough for Love, by Robert A. Heinlein

View solution in original post

0 Kudos
2 Replies
MErikReedAugusta
MVP Regular Contributor

If I'm understanding your needs correctly, there are multiple ways to skin this bird.

One of the easiest would actually involve ArcGIS Pro, and I think it should still work with Sync & Keep Track of Features:

  1. Open an empty project in ArcGIS Pro
  2. On the Catalog Pane, navigate to the "Portal" tab
  3. Search for your web map, and open it
  4. Select all of the assets on the layer in question
    • N.B. If you have any queries on that layer, you might want to temporarily disable them for the moment, just to make sure your default value gets written to every asset.
  5. Open the Attribute Pane
  6. In the tree view section at the top, if you click on the name of the Layer, instead of a single asset, you'll be able to change values for everything.
  7. Find the field in question and just change the value.  This might take some time, depending on your connection.
  8. Save your edits
  9. Close the project.  You don't need to save it unless you want to; we shouldn't need it anymore.

All of the assets should have the new default value.

 

You could also use the Field Calculator from inside Pro, and then you get your choice of Arcade or Python 3 (or maybe Visual Basic?  Can't remember if it's still in Pro, because I avoid it like the plague).

------------------------------
M Reed
"The pessimist may be right oftener than the optimist, but the optimist has more fun, and neither can stop the march of events anyhow." — Lazarus Long, in Time Enough for Love, by Robert A. Heinlein
0 Kudos
EmilyGeo
Esri Contributor

Just fyi, the field calculator is also available in Map Viewer, saving you from having to open a separate app to calculate a field. You can find out more in this article Introducing Calculate Field in Map Viewer

0 Kudos