1

I have a field for "Length" regarding some data collected in the field. Unfortunately the "ft" after the number for the length had spaces or no spaces or a weird format, but basically I want Length to look like this: "9 ft" - "7 ft" - "8 ft" ...etc. At the moment it just says, "9, 7, 8." Anybody know how to fix this in the field calculator in ArcGIS Pro?

enter image description here

3 Answers 3

3

Your length field is likely a numeric field. If you want the values to include text at the end, you'll need to first add a new field with a string or text type. Then you can use the field calculator to populate the new field. With Python syntax, it would look like:

str(!Length!) + " ft"
0
2

If the Length field is numerical (e.g. integer or floating point) then you cannot include text in that column. The benefit of having the field be numeric is that you can use it in queries, classification, and calculations if you decide down the road to do any analysis on your data.

If you would like to indicate in the table that the length measurement is recorded in feet then you can change the heading to something like "Length_ft". This will only change the heading and the column data will not change and will still be numeric.

If you would like for the labels on your map to indicate that it the measurement is in feet then you can edit the labels to include "ft" or you can just indicate that the measurement is in feet in your legend heading.

If you are absolutely sure that you will never want to do any symbology classification or analysis then you can convert the field to string and add "ft" in the field (as outlined in the chosen answer.) Once you do this, you lose the functionality of a numeric field.

2
  • Would that add "ft" to the numbers all at once?
    – MF1995
    Commented Jul 2, 2018 at 15:28
  • 1
    No, it would only change the heading. The column would still only be numbers. I do it that way if I want to be able to use the column for calculations so I want to keep it in number format.
    – Sammy
    Commented Jul 2, 2018 at 15:30
0

I figured it out, the image posted is how I was able to fix it.enter image description here

2
  • 5
    I kind of think you have shot yourself in the foot here. You will not be able to do any querying of the data such as select me all lengths from 9 to 11 feet. You've created a string field so you can't do that. Would have been smarter to draw from the numeric field and add "ft" when you label the features, if that was your intention?
    – Hornbydd
    Commented Jul 2, 2018 at 15:33
  • Ugh, I don't like having to change software programs in the middle of short deadline projects..
    – MF1995
    Commented Jul 2, 2018 at 15:36

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.