I recently downloaded a FGDB from NOAA at https://marinecadastre.gov/ais/

The FGDB contains a point feature class with ship locations. One of its attribute fields, named [Status], is of type Long Integer. However, every value in that field contains text. Here's a screenshot showing the field's contents and its properties:

enter image description here

This made me curious about storing text in a numeric field, so I added a new text field [text123] to the feature class table. I tried to copy the text values from [Status] to [text123] using str([Status]) in the Field Calculator. Although it worked, the resulting values in the text field were all numbers(!), as if they were code values (that is, wherever [Status] = "At anchor", [text123] = 10. Wherever [Status] = "Under way using engine", [text123] = 20, and so forth. I also tried cstr() with the same result.

This led me to conduct an experiment. I created a new FGDB table that contained a Long Integer field. I tried to populate that field with text values, first in edit mode then outside of edit using the Field Calculator. In both cases, ArcMap responded with errors (as expected) that prevented me from populating the field with text.

The download site does not provide tech support, so I don't know how they managed to put text data in a numeric field. From my above experiment, I am unable to reproduce this.

My question(s): Is there a reason to store text values in an integer field, and if so, how can text be placed there?

  • 3
    You missed the "Domain | Status" part of the field properties page. The datatype is integer, with lookup values represented in text. – Vince Dec 2 '17 at 1:40
  • Yes, Vince is right. You can create domains on GDB level and link it to fields. Domain work like lookup tables. You store a code or number in the field but ArcMap will display the mapped value. – Thomas Dec 2 '17 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.