Select to view content in your preferred language

Model Builder - Formatting Numeric Fields

2284
6
11-10-2010 07:40 PM
UlrichStroetz
Emerging Contributor
is there a way to set the format of numeric fields in model builder?

thanks,

uli
0 Kudos
6 Replies
JamesHood
Regular Contributor
Can you provide more information about your problem please?

What tool, what exactly you would like to format?  Anything else?
0 Kudos
UlrichStroetz
Emerging Contributor
for example when i add a new field to an existing table and then calculate a field in there. i know i can set in "add field" type: double. but what i also need to set is the format to currency.
0 Kudos
JamesHood
Regular Contributor
In your case with regards to currency, Perhaps in USD, or EURO,  you will want to set the precision and scale when you add the field. 


Precision denotes the number of number places on the left of the decimal, and scale denotes the number of number places on the right. 

It is probably a good idea to leave the precision as its default  so that the value input can be variable.  eg. 1's, 10's 100's 1000's etc.  Likely you want to set the scale to only 2.  This will limit the decimals to 2 places with a maximum value of 99 cents and a minimum value of 1 cent. 


Precision and Scale -- See:  http://resources.esri.com/help/9.3/arcgisdesktop/com/gp_toolref/data_management_tools/add_field_data...
0 Kudos
UlrichStroetz
Emerging Contributor
thank you for the information, but what i am looking for is that in the field the actual dollar sign appears. if a open the attribute table in arcmap, i can set in the field properties a number format. for example currency. do you know how i can set this number format in model builder, for the field i add?
0 Kudos
RichardFairhurst
MVP Honored Contributor
thank you for the information, but what i am looking for is that in the field the actual dollar sign appears. if a open the attribute table in arcmap, i can set in the field properties a number format. for example currency. do you know how i can set this number format in model builder, for the field i add?


Unless the property is exposed through one of the tools in the Layers and Table Views subgroup of the Data Management tools group I don't think you can set it.  You are describing a layer property, and not a feature class property, so the layers group is the logical place to look.  ModelBuilder is far from a fine grade tool set that gives full access to all settings available through the ArcMap interface.  It is very course grade.  ArcObjects provides fine grade access all properties and setting levels, but cannot be integrated into ModelBuilder.  ArcPy at ArcGIS 10 is a definite step up over ModelBuilder for accessing properties, but it also cannot access as many properties as ArcObjects at this time.  Eventually ArcPy may match ArcObjects and then you could use it within ModelBuilder Scripts to manipulate settings within the ModelBuilder environment.
0 Kudos
UlrichStroetz
Emerging Contributor
yes, you are right. i am describing a layer property. so that is properly not possible with model builder. thanks for your explanation. but i thought, since it is also possible to set the symbology of the output layer, i thought it might be possible as well.
0 Kudos