Each field, or column, in an attribute table has properties that describe its contents and how the data in it should be displayed. You can view and, in some cases, edit the field properties on the Fields tab of the Layer Properties and Table Properties dialog boxes. The settings on the Fields tab are used to determine how attributes will be shown in ArcMap, including in the attribute table window, in the Identify window, and when editing in the Attributes window.
For example, you can do any of the following:
- Define which fields are displayed (the visible fields).
- Define an alias for a field name so the field appears in the table with a name that is easy to understand. This is helpful because you cannot change the names of fields in your data once they are created.
- Define the formatting for numeric data, such as for currency values or to display a relevant number of decimal places. Formatted data appears in the Identify window, Attributes window, legends, the table of contents, table windows, and so on.
- Determine the display field, which is used by the Identify window, Attributes window, and other functionality in ArcMap.
- Write an expression that can be used to build a more complex display string entry in place of the contents of the display field.
- Set table display options and work with columns.
Some field properties are defined when the table or feature class is created and cannot be changed, including field type, length, precision, and scale.
Navigating the list of fields on the Fields tab
The settings you choose on the Fields tab, including visibility, order, and alias, are used throughout ArcMap when you are working with attributes, such as in the attribute table window, in the Identify window, and when editing in the Attributes window. These settings also apply to fields that are appended in a join, although you are only able to edit the joined fields when they are accessed from the origin table.
The left side of the Fields tab contains a list of all the fields in the feature class or table, including any fields that have been joined to it. You can check the box to show the field and uncheck it to hide it in ArcMap. You can toggle visibility for all fields by clicking the Turn all fields on or off button, holding down CTRL and clicking a check box, or pressing CTRL+SPACEBAR when a field is highlighted in the list.
The order in which fields are listed on the Fields tab is the default order in which they are displayed throughout ArcMap. To reorder a field, click it in the list and drag it to the position you want, or click the arrow buttons to move it up or down the list. You can also select multiple fields and reorder them at the same time. Clicking the arrow buttons will move the selected field (or fields) up or down one position in the list. To move it to the very top or bottom of the list, click the drop-down arrow next to the arrow buttons and click Move To Top or Move To Bottom.
To sort the list by alphabetical order, click the Table Options button and choose either ascending or descending order. To return the order to the original way as specified in the data source, click the Table Options button and click Reset Field Order. In addition, use the Table Options menu to toggle between showing fields in the table by aliases or actual field names.
Setting field properties
When you click a field in the list on the left, the individual field's properties are displayed on the right side of the tab (the right side will be blank when you have multiple fields selected). You can change the properties that are shown in the Appearance section but not the ones listed under Field Details. When you click a row on the right side, an explanation of the property is provided in the box at the bottom of the tab.
Appearance properties specify how the contents of the field are displayed in ArcMap. The field alias is an alternative name for a field and can be more user-friendly than the actual name of the field. If you want to distinguish certain fields—for example, to make them easier to see when editing in the Attributes window—set the Highlight property to Yes. This will change the font color and add background shading so those fields will stand out from the others. You can also set a field to be read-only, which means you can view but cannot edit that field, regardless of the file or database permissions. In addition, if you are working with numeric fields, you can set the format of the numbers by clicking the ellipsis button in the Number Format row. Each category—currency, numeric percentage, fractions, and so on—has its own set of available formatting options.
The items listed under Field Details are ArcGIS system properties, which include the field data type, name, precision, scale, length, the names of any coded value or range domains, and whether or not null values are allowed. These will vary by the data source (geodatabase, shapefile, and so on) and the field type (string, long integer, date, and so on). Because you can view but cannot change these properties, they are shown in gray text rather than black text.
Field aliases
An alias is an alternative name for a field—a more user-friendly description of the content of the field. Unlike true names, aliases do not have to adhere to the limitations of the database, can contain up to 255 charatcers—including spaces, numers, and special characters. By specifying an alias, you can give names to fields that are more descriptive than their actual field name.
For example, you might specify an alias of "Date of deed" for a field stored in the geodatabase as DEED_DATE.
There are two types of field aliases: feature class field aliases (geodatabase only) and layer field aliases. You work with feature class field aliases in ArcCatalog on the Feature Class Properties dialog box. When a geodatabase feature class is added to ArcMap, its field aliases are used initially for the layer field aliases. However, after this there is no link between the two. Properties set in ArcMap will override the properties of the data source, but they will not be carried back to the data source. This means that if you change a layer field alias, it will not change the feature class field alias, and if you change a geodatabase field alias, it will not update the layer field alias for any existing layers based on the feature class.
You can only maintain what you set on the Fields tab by saving the map document or the layer to a .lyr file.
Table display options
When you open a table, you can customize its appearance in a variety of ways. For example, if you don't like the default table font, you can change it and set the font size as well. You can make changes for all tables or just one—each table can have its own individual settings.
When examining an individual table's contents, you can resize columns to better see their values. You can also reposition them to compare the values in one field to the values in another. Freezing a table's columns can be helpful when you're exploring its contents. Frozen columns are locked in position at the left of the table and are separated from the other columns by a heavy black line. When scrolling horizontally, all other columns move normally, but the frozen columns remain fixed.
Some of the display options you can set include the following:
- Changing the width of the visible fields and rearranging them
- Freezing a field so that you always see it as you scroll across the table
- Choosing whether to show the values or the descriptions for fields with subtypes or domains
- Changing the color or font that is used to display attributes in tables
- Setting table header and cell heights
- Setting the character that indicates that a field is indexed (Indexes can improve the performance of queries.)
Setting column header and cell heights
You can change the heights of the column headers (the row along the top of the Table window that shows you the names of the fields) and cells. By increasing these values, you can increase the height of the rows.
If the value you specify for the column header or cell height provides enough space to accommodate additional lines, the field name inside the column header or the content in the cell will wrap if it exceeds the current width of the column. This is particularly useful if your table contains long field names or long text fields, such as description or comment fields. Increasing the header or cell height in your table can make these fields easier to read.
The default height of a header is 125 percent of the font size. The default cell height is 115 percent of the font size. If you set the cell height value to be below 115%, it can prevent the insertion bar appearing when you try to edit the contents of cells.
You should normally leave the default header height value at 125% and the default cell height value at 115% on the Tables tab of the Customize menu > ArcMap Options dialog box, so all the new tables you create use this standard setting. If you want a particular table to have taller rows so long text fields wrap around as shown above, specify the setting through the Table window's Table Options > Appearance dialog box. In this way, the setting will just apply to that particular table.
Quickly setting field properties and aliases
With the Table window open, you can right-click a field heading and click Properties to open a dialog box that allows you to set and view certain properties of that field. This dialog box lets you specify a field alias; turn the field on or off; change its number format if it is not a string field; and review (but not change) the field's other data properties, such as whether it allows null values, and its precision and scale.
Setting column widths
In the Table window, fields are shown in columns. You can drag the column dividers between fields left and right to change their width, including dragging dividers so that fields are completely hidden.
You can also automatically reset the column widths to undo changes you made. The Restore Default Column Widths command in the Table Options menu resets all the columns to their default widths. This also reveals any fields that are completely hidden because their column has been dragged to have no width. The Restore Default Column Widths command doesn't reset the field order, so if you have dragged fields around in the Table window, this reordering is preserved when you use the command.
If a field has been completely hidden in the table, you'll see a thicker column divider at that position. This makes it easy to see where one or more fields have been hidden. If several fields have been hidden at that position, you'll see an even thicker divider.
To unhide a hidden field, drag the thick divider to the right, or double-click the divider. To reveal all hidden fields, use the Restore Default Column Widths command in the Table Options menu. Completely hiding fields in the Table window is useful because it lets you choose how you want the table to appear, including how it appears when you use the Print command in the Table Options menu to print the table, without turning fields off completely, which would prevent them being listed elsewhere.