3

I have a coded domain field with 10 dropdown options. Possible choices include integers and text.

I need to change a selection of 250 features (which have differing values) to the same value. This value is one of the dropdown values.

When I use the field calculator (field="value") I get an error. The calculated value is invalid.....

Anyone know how to change multiple values within a coded domain field?

enter image description here

1
  • 5
    Are you calcing in the actual string value or the coded value? So if for example, 1 = "foo", I'm thinking you are needing to calc in the 1, and not "foo". Commented Mar 18, 2013 at 14:02

1 Answer 1

2

It will depend somewhat on the type of field and domain you are using.
Assuming you are using the defaults, integer, and coded value.
you want the syntax in the field calculator to be (selectedrowsinmydomainfield) = newcodedvalue in the example...
Pic1
nom_size is the domain with 1 = 1"
If I want to change all selected values to 1".
I use the syntax in the middle ( [nom_size] = 1
If you are using text field with a text domain.

EDIT:
Ok since you are using a text domain and your codes all match your descriptions.
If you want to change all selected rows to be BETH.
[ZONE_] = "BETH"

11
  • Possible choices include integers and text.
    – Thad
    Commented Mar 18, 2013 at 15:44
  • you want to match that (the domain type) to the field type you are applying it to. Are you using text or int? the benefit to text (there are drawbacks) is that you can make the code exactly the same as the description (what displays in attribute).
    – Brad Nesom
    Commented Mar 18, 2013 at 15:48
  • text. I added an image which might make things more clear.
    – Thad
    Commented Mar 18, 2013 at 15:52
  • re: EDIT, yes that is what I have been trying. But I'm getting the error "The calculated value is invalid....."
    – Thad
    Commented Mar 18, 2013 at 17:26
  • (field="value") is incorrect. you need the field name in braces and the value in double quotes. The parenth can be there if your field name is in braces (but not required)
    – Brad Nesom
    Commented Mar 18, 2013 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.