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?
3 Answers
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"
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.
-
-
1No, 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.– SammyCommented Jul 2, 2018 at 15:30
-
5I 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?– HornbyddCommented Jul 2, 2018 at 15:33
-
Ugh, I don't like having to change software programs in the middle of short deadline projects..– MF1995Commented Jul 2, 2018 at 15:36