After you publish a hosted feature or table layer, you may need to store information about an additional attribute. If you are a layer owner or organization administrator, you can add a field to the layer from the Fields pane in Map Viewer. Similarly, if you discover that a set of attributes is no longer needed, you can delete the field that stores those attributes from the layer. You can also manage a subset of field properties for existing fields from the Fields pane.
Add a field
Follow these steps to add a field to an attribute table in Map Viewer:
Note:
You can also add a field from the Table or Fields view on the Data tab of a hosted feature layer's or table's item page.
- Confirm that you are signed in and, if you want to save your changes, that you have privileges to create, update, and delete content.
Note:
You can explore maps, add and configure layers, and more without signing in. To save your work, sign in before creating a map. - In Map Viewer, open the map containing the layer or add the layer directly.
- If you are working with a hosted feature layer, on the Contents (dark) toolbar, click Layers if the Layers pane is not open. If you are working with a hosted table layer, on the Contents (dark) toolbar, click Tables if the Tables pane is not open.
- In the Layers or Tables pane, click the layer to select it.
- On the Settings (light) toolbar, click Fields to open the Fields pane.
- Optionally, click Sort to sort the fields by the default sort order, display name, type, or field name.
Note:
If there are fewer than five fields, the option to sort the fields will be unavailable. Field sort order is not saved with the map or layer item.
- At the bottom of the Fields pane, click Add field.
- In the Add fields window, select the data type that will be stored in the field from the following:
- Text—Values that contain alphanumeric or special characters.
- String—Store a set of alphanumeric characters of a specified length.
If you add a string field, use the Length property to define the field's maximum single-byte character length. Length is required for the String field type. The default is 256 characters.
- String—Store a set of alphanumeric characters of a specified length.
- Numbers—Values that contain numeric information.
- Double—Store numbers with decimal places.
- Integer—Store whole numbers from -2,147,483,648 to 2,147,483,647 (long integer).
- Big Integer—Store whole numbers from -9,007,199,254,740,991 to 9,007,199,254,740,991. Use this type when using numbers that are outside of the supported integer field range.
- Dates—Values that contain temporal information.
- Date—Store values with date and time. See Date and time fields in ArcGIS Online.
Note:
While ArcGIS Online stores all date values in coordinated universal time (UTC), you'll typically view and edit dates in your local time zone because most applications automatically convert to and from UTC. You will, however, need to specify the appropriate time zone when uploading the data—for example, as .csv files or shapefiles—otherwise, the data is assumed to be in UTC.
- Date Only—Store date values with no time values. This is useful when times aren't needed, such as when recording the day a permit expires or a customer's birth date.
- Time Only—Store time values with no date values. Time is in 24-hour time, such as 16:30 for 4:30 p.m. This field data type is useful for recording such values as business hours and bus schedules.
- Timestamp Offset—Store values indicating the date, time, and the time's offset from coordinated universal time (UTC). Including the value's offset from UTC with individual date and time values unambiguously identifies a single point in time. This makes a timestamp offset value more portable from one computer to another than a date value. For example, to store a value that indicates October 10, 2023, at 3:03 p.m. in the Newfoundland time zone (which is 3.5 hours behind UTC time), editors would provide the value 2023-10-10T15:03:00-03:30.
- Date—Store values with date and time. See Date and time fields in ArcGIS Online.
- Global identifiers—Values that uniquely identify a feature or table row.
- GlobalID—Store a 36-character string consisting of letters and numbers used to uniquely identify a feature.
- GUID—Store a 36-character string consisting of letters and numbers. A globally unique identifier, or GUID, is frequently used to manage relationships between features.
- Text—Values that contain alphanumeric or special characters.
- When you have selected a data type, click Next, and configure the field's attributes. To go back and change the data type, click Back.
- When you finish configuring the field, click Add field.
The field is added to the layer's attribute table.
Tip:
Open the layer table to view the fields and to add, delete, and update features from the table.
Delete a field
Use caution when deleting fields because, once you delete a field, the data in the field cannot be restored.
You cannot delete system fields such as the OBJECTID, CREATIONDATE, CREATOR, EDITDATE, and EDITOR fields or fields used to define styles stored in the layer, the time slider, filter, labels, search, or editor tracking. However, maps may be using fields for styling and filters that are different than the fields you configured on the layer, and the Delete option is available for these fields. Use caution when deleting fields that may be used for styling and filtering in maps.
Follow these steps to delete a field from an attribute table in Map Viewer:
Note:
You can also delete a field from the Table or Fields view on the Data tab of a hosted feature layer's or table's item page.
- Confirm that you are signed in and, if you want to save your changes, that you have privileges to create, update, and delete content.
Note:
You can explore maps, add and configure layers, and more without signing in. To save your work, sign in before creating a map. - In Map Viewer, open the map containing the layer or add the layer directly.
- If you are working with a hosted feature layer, on the Contents (dark) toolbar, click Layers if the Layers pane is not open. If you are working with a hosted table layer, on the Contents (dark) toolbar, click Tables if the Tables pane is not open.
- In the Layers or Tables pane, click the layer to select it.
- On the Settings (light) toolbar, click Fields to open the Fields pane.
- Optionally, click Sort to sort the fields by the default sort order, display name, type, or field name.
Note:
If there are fewer than five fields, the option to sort the fields will be unavailable. Field sort order is not saved with the map or layer item.
- Check the box next to a field to select it, and click Delete field.
The field is deleted from the layer's attribute table.
Tip:
You can also manage field properties such as Display name by selecting a field from the Fields list. You can select multiple numeric fields to set field properties such as the number of significant digits displayed. Click Done to save changes to the field properties.
Restrictions when adding or deleting fields
Consider the following when adding or deleting fields:
- You cannot add fields to or delete fields from copies of hosted feature layers, hosted feature layers that have related tile layers, or views created from hosted feature layers.
- You cannot add fields to or delete fields from hosted feature layers that have a dependent joined feature layer view.
- When you add a field to a hosted feature layer that has dependent hosted feature layer views, you must update the definition of each view in which you want the new field to appear. This is not possible if the view is a hosted joined feature layer view, as stated above.
- Added and deleted fields are not propagated from the hosted feature layer or view to dependent hosted scene layers.
- Some field types may not be fully supported in all ArcGIS clients.