I'm using ArcMap 10.5.1 and working from a geodatabase.

I just want to limit the number of decimal numbers shown to 1. Currently 6 decimals are shown, and I know I can reduce them manually by opening each field properties window and setting the value to the desired decimals.

The problem is that I'm working on a ModelBuilder to get the desired result for my project, and I have to run it every once in a while, therefore losing the manually edited fields.

Also, the value I'm interested in this project is the polygons area, which is an automatically created field and I can't setup it's properties from the beginning.

Is there any way to set up how many decimals will be shown by default in the field everytime a new one is created?

  • I don't have ArcGIS in front of me, but could you perhaps include a step in the model builder, right after finding the areas, where you use Calculate field with the expression round([AREAFIELD], 1)? – humperderp Nov 20 '19 at 14:54
  • 1
    Not the solution I expected, since it adds extra steps in my model builder and I prefer to simplify it, but it solved my problem. Thank you very much!! – adriasf Nov 26 '19 at 9:37

You have specifically worded your question around how many digits are shown as opposed to how many digits are stored, which are two quite different things, so this answer addresses how to modify what is shown/displayed as opposed to what is stored.

You can configure your layer, in ArcMap to display only a specified number of decimal places, even if a more accurate number of decimal places is stored in the attribute as follows (assuming it is a double field):

  • Right-click the layer in the ArcMap table of contents and choose Open Attribute Table
  • Right-click the attribute column header in the attribute table and choose Properties
  • Click on the small square "..." button next to "Numeric" (to the right of "Number Format")
  • Change the "Number of Decimal Places" value to "1"
  • Click "OK" and then "OK" again

NB: This will not affect what is stored in the column and therefore will not affect what value is used when exporting, joining, used for calculations based on that columns, etc. Only what is displayed in the attribute table AND what is displayed in labels. Of course it only affects how they are displayed in the current layer. Any other layer (or any other map) that uses the same data source will not be affected.

Note also that this will round the last decimal digit, not truncate the value. So, for example, 5.0632 would be displayed as 5.1 NOT 5.0.

  • The question asks for a way to predefine (or automatically set, I would assume) how many decimals are to be shown in new fields that are created iteratively. Not how to set this manually. – humperderp Nov 20 '19 at 22:00
  • This method predefines how values are shown for new values as well as for existing values, no matter how the are created. Iteratively, automatically, manually, etc. As stated though, it only affects how they are shown (displayed), not now they are stored. – Son of a Beach Nov 20 '19 at 22:02
  • I think maybe the 'field' terminology, which denotes columns in ArcGIS attribute tables, might be causing the confusion. Will your method define the number of displayed decimal places in all future columns (fields) to be created in an attribute table? – humperderp Nov 20 '19 at 22:09
  • 1
    OK, I see what you mean now. No, this cannot be incorporated into a model for new feature classes and new fields. It's unclear in the OP if the periodical re-running of the model just replaces existing feature class(es), or if it creates additional feature class(es). If it is just replacing existing feature classes, then this technique should be fine, as the layers in a map document would still have the appropriate configuration set and it is only the data underneath that is changing. – Son of a Beach Nov 20 '19 at 22:14

In ModelBuilder some tool (mostly export or conversion tool I think) let you set each output field properties by right clicking on the field name in the field map part of the tool.

Depending on what king of geodatabase you are using you may be able to set the field length and scale directly in the model and get consistant output.

Extract from the ESRI help :

If you're specifying numeric fields for a table in a file or personal geodatabase, you need only specify the data type. If you're specifying numeric fields for a database or enterprise, workgroup, or desktop geodatabase, also specify the precision (the maximum length of the field) and scale (the maximum number of decimal places).

Specifying the precision and scale allows you to restrict the range of values and number formats a field can accept, giving you greater control. For example, if you specify a float with a precision of 4 and a scale of 2, the field will accept 12.34 (or 12.3 or 12). If you try to enter 12.345 into the field, an error message displays, as this exceeds the maximum number of digits and decimal places allowed. On the other hand, if you specify a float with a precision of 5 and a scale of 3, the field would let you enter 12.345, 12.34, or 12.3

I didn't see that it was for the shape_area automatic field, the tool let you choose the properties for this field but I don't know if it apply it or not...if you try this solution let us know if it work or not

Your Answer

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

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