You can alter certain settings on a hosted feature (or table) layer, while others are set on individual layers in the hosted feature layer. The following sections describe how the layer owner, or an administrator, can manage the settings for a hosted feature layer and the layers it contains.
Tip:
When you enable the following settings, anyone who can access your hosted feature layer can use the functionality the settings impart. Take this into consideration when you share your layer.
- Enable Sync (required for offline use and collaboration)—Use a hosted feature layer offline or in a collaboration.
- Allow others to export to different formats—Export data from the hosted feature layer.
- Enable attachments—Add attachments to features in hosted feature layers.
Also be aware that when you share a hosted feature layer with a shared update group, group members can manage many of the settings on the layer.
Rename layers
You can change the name of hosted feature layer items and layers inside hosted feature layers.
Changing the layer names in a hosted feature layer does not affect the names in any dependent hosted layers or views. Similarly, changing the dependent layer's item name or the names of the layers in the dependent layer does not change the names in the source hosted feature layer.
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Rename the layer.
- To rename the hosted feature layer, click the Edit button next to the layer name on the Overview tab.
- To rename a sublayer, open its item page by clicking the layer name under the Layers list on the Overview tab, and click the Edit button next to the sublayer name.
- Type a new name for the layer and click Save.
Manage settings for editing
As the owner of a hosted feature layer, or an administrator, you can alter settings on the feature layer that affect who can edit and what edits they can make. Other factors also affect who can edit. See Manage hosted feature layer editing for information about all the settings and factors that affect who can edit a hosted feature layer.
Allow data exports
As the owner of a hosted feature layer or an administrator, you can export data from the layer to a comma-separated values file (.csv), Microsoft Excel file, shapefile, file geodatabase feature class, GeoJSON file, feature collection, or Open Geospatial Consortium (OGC) GeoPackage file. You can also configure a hosted feature layer to allow others to export data from the layer when they access it in the portal.
Tip:
If you publish a hosted feature layer from ArcGIS Pro, you can configure the feature layer to allow data exports when you publish.
When users other than the owner or administrator export from a hosted feature layer view that has field or feature definitions applied, the exported file only contains those fields or features that the definition allows. When the owner or administrator exports, the definitions are not applied and the exported file contains all fields and features.
Follow these steps to allow others to export from a hosted feature layer or hosted feature layer view when they access the layer in the portal website:
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Click the Settings tab.
- Scroll to the Feature Layer Settings section.
- Click Allow others to export to different formats and click Save.
Now other members of your organization can export from the hosted feature layer.
Note:
This setting does not affect others' ability to export data from the underlying service. Even if you do not enable this export setting on your feature layer, anyone who accesses this layer in other clients—such as ArcGIS Pro or custom apps—can export data from it.
Allow attachments
You can allow editors to attach images and other files to individual features in a layer in a hosted feature layer. This allows you to associate documentation or photos to specific, relevant features. For example, a code compliance officer can attach a photo of the code violation for a specific address point, or a building inspector can include a PDF of a permit for a building feature.
Each hosted feature layer view inherits the attachment setting of the hosted feature layer from which it was created. By default, all view users can see the attachments inherited from the hosted feature layer. To control who has access to these attachments, you can hide the attachments in the hosted feature layer view.
Each file you attach to a feature can be a maximum of 2 GB. To attach files larger than 2 GB, you can use the Upload Part and Add Attachment operations from ArcGIS REST API to do a multipart upload.
For a list of supported file types you can attach, see Edit tables.
Follow these steps to allow people to attach files to features in a layer in your hosted feature layer:
- Enable editing on the hosted feature layer.
If you do not enable editing, users cannot add attachments to the layer.
- Open the feature layer item page by clicking the layer on the My content tab of the content page.
- Click the name of the layer in the Layers list on the Overview tab to open its item page.
- Click the Enable Attachments toggle button.
Now, when others edit the layer, they can attach files to individual features.
If you decide you no longer want files to be attached to your layer, open the sublayer's page and disable the Enable Attachments toggle button. Be aware, though, that this removes all existing attachments from the layer and prevents people from adding more attachments.
Hide attachments in views
Hide attachments in hosted feature layer views if a subset of users need access to the feature attributes, but they should not see or do not require access to the attachments.
For example, if the attachment contains sensitive information that only a few organization members should see, share the hosted feature layer with a group that contains those few members. Create a hosted feature layer view from the layer, hide the attachments, and share the view with a larger audience.
Follow these steps to hide attachments on individual layers in a hosted feature layer view:
- Sign in to the organization as the owner of the hosted feature layer view or as an administrator.
- Open the item page for the hosted feature layer view.
- Locate the Layers list on the Overview tab and click the layer that has attachments you want to hide.
- Click the Hide attachments toggle button to prevent users of the hosted feature layer view from accessing the attachments on that layer.
- Repeat steps 2 and 3 for each layer that has attachments you don't want users to access through the view.
If you decide view users do need access to the attachments for one or more of the layers in the view, click the Show attachments link under the applicable layers on the Overview tab of the hosted feature layer view's item page.
Enable time settings
If you have a hosted feature layer that records different information for the same location based on a date and time, you can enable time settings on layers in a hosted feature layer. After time settings are configured and you add the hosted feature layer to a map, you can configure time settings on the map and see what happened at a specific time or visualize patterns and trends that emerge as the data changes over time.
Overwrite hosted feature layers
You can replace all the data in a hosted feature layer that you published from one of the following file types:
- File geodatabase (zipped)
- Shapefile (zipped)
- GeoJSON file
- Microsoft Excel file
- .csv file
To overwrite the hosted feature layer with the contents from an updated file, upload an updated source file. You must use the same type of source file, and the schema in the source file must be the same as when you published the hosted feature layer.
For example, if the hosted feature layer is public and you don't want it to be editable, or if another department regularly sends you data updates in a shapefile, you can overwrite the data in the hosted feature layer using the updated file. This maintains the layer's URL, the properties that you set on the Overview and Settings tabs of the hosted feature layer's item page, symbology, and pop-up configurations. However, because overwriting the hosted feature layer republishes the service and overwrites every layer in the hosted feature layer, field settings such as unique value, default values, and disallowing null values are not preserved, and you must reset them after you overwrite the hosted feature layer.
When you overwrite the data, both the source file and the hosted feature layer data are replaced with the data from the updated source file. If the source is a shapefile with metadata or a file geodatabase that contains feature classes with metadata, the portal adds or replaces the layer-level metadata in the hosted feature layer.
If the option to overwrite the feature layer isn't available, the hosted layer cannot be overwritten due to one of the following conditions:
- It was published from a client other than the ArcGIS Enterprise portal. For example, if you published the hosted feature layer from ArcGIS Pro, you must overwrite the service from ArcGIS Pro.
Note:
You cannot overwrite the hosted feature layer from ArcGIS Pro if you add layers to the map, delete layers from the map, or reorder the layers in the map before overwriting. If you need to add, delete, or reorder layers before overwriting the hosted feature layer, you must first delete all dependent views from the hosted feature layer.
- It was published while the ArcGIS Enterprise portal was at version 10.4.1 or earlier.
- Synchronization is enabled on the hosted feature layer.
- It's a hosted feature layer view rather than a hosted feature layer. To update the data in both the hosted feature layer view and hosted feature layer from which it was created, overwrite the hosted feature layer and the updates will be reflected in the view.
- You enabled data change tracking on the layer.
- You deleted the associated source file.
- You opened the Update layer window from a sublayer page or from the Data tab of the hosted feature layer item.
- You're not the hosted feature layer owner or a member of the default administrator role.
Caution:
- Any edits that were made to the hosted feature layer data are replaced by the data from the updated source file. If the hosted feature layer contained attribute indexes and you overwrite using source data that does not have attribute indexes, you must re-create the attribute indexes on the hosted feature layer.
- The same fields and feature classes (in the case of file geodatabases) must be present in the updated file as were in the original file. For example, if you delete a feature class from the file geodatabase, or add a field to the shapefile or feature class, do not overwrite.
- The file and field names must be the same as they were in the original file you uploaded. If you upload a file geodatabase, the feature class names must be the same as they were in the original file you uploaded.
- If you overwrite and the field and feature class names and schemas do not match, the feature layer and web maps that use the feature layer may not function as expected. If the source data schema has changed, or if you want to preserve the edits made to the data in the hosted feature layer, load the file as a new item and publish a new layer instead.
- The data source and hosted layer must be owned by the same account. If you change the owner of one, change the owner of the other. If you do not, you can't overwrite the hosted layer.
- If you altered the details of individual sublayers, those edits will be lost when you overwrite the hosted feature layer from a file.
- The feature layer will be unavailable to other users for a brief time while the layer is overwritten.
Follow these steps to overwrite a hosted feature layer from a file:
- Sign in to the organization as the owner of the hosted feature layer or as a member of the default administrator role.
- Open the item page for the hosted feature layer.
- Click Update Data on the hosted feature layer item's Overview tab.
The Update layer window appears.
- Choose Overwrite entire feature layer.
- Click Next to specify a file on disk. Use one of the following methods to choose the file and overwrite the hosted feature layer's contents:
- Click Your device, browse to and select the file, and click Open.
- Drag the file from your desktop or File Explorer onto the Update data window.
Add and update features from a file
The owner of a hosted feature layer or hosted spatiotemporal feature layer or the organization's administrator can use an updated file to add features to a layer in an existing hosted feature layer. This allows you to publish initial data, or even an empty hosted feature layer, and later add more data as it becomes available without having to overwrite the entire hosted feature layer. For example, if you have a number of employees who do inspections in the field and they gather that information in a .csv file or a custom app that writes to a shapefile, you can take the file from each inspector at the end of the day and update the hosted feature layer with the new data.
If the update file contains changes to features that are already published, you can also use the input file to update existing features. This requires that the layer and the file you use to load updates both contain a field of unique values that ArcGIS Enterprise can use to identify the feature to update. You can define a field in the sublayer of a hosted feature layer as unique from the Data tab of the layer's item page and use that field as an identifier, or use a global ID in one of the sublayers for a unique ID.
Caution:
You must ensure that the field values in the update file and the layer correctly and uniquely identify the feature to update. If the values do not, you can lose data when an update overwrites attributes for an existing feature. Adding and updating features fails if you update results with nonunique values in a field you have identified as unique.
Field names, including the letter case, in the file you use must be identical to those in the existing feature layer. When you publish from a .csv or Microsoft Excel file that has field names with spaces, the field names in the hosted feature layer have underscores inserted between words. When you add or update, you must insert underscores in the field names in the file; otherwise, field names will not be identical.
You can use the following file formats to add or update data:
- Shapefile (zipped)
- CSV file (.csv)—The spatial field must be provided in latitude and longitude coordinates.
- Microsoft Excel file—The spatial field must be provided in latitude and longitude coordinates.
Note:
- The update operation does not delete features. To delete features using an uploaded file, overwrite the layer.
- If the hosted feature layer is enabled for offline editing, you can only add features; you cannot update features.
- Adding or updating features does not add or update attachments on the hosted feature layer.
- Timestamp offset fields are not supported for hosted feature layers.
- To add or update big integer, date only, or time only fields from Excel or .csv files, the field values must meet the following requirements:
- Integer values that fall outside the range of -2147483648 to 2147483647 will be interpreted as big integers.
- To be interpreted as date only, values must be in the format YYYY-MM-DD or DD/MM/YYYY.
- To be interpreted as time only, values must be in the format hh:mm:ss or hh:mm:ss.sss.
For examples of date and time values, see Date and time fields in ArcGIS Enterprise.
If the hosted feature layer does not contain these field types, you can map them to other types, such as a double for big integer fields or a string for date only fields.
Follow these steps to upload a file to add features to or update features in a hosted feature layer:
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Click Update Data on the hosted feature layer item's Overview tab.
The Update data window appears.
- Choose one of the following options and click Next:
- Add features—Inserts new features from the file to the feature layer or inserts new rows to a table layer.
- Update features—Uses the values in the file to update attribute values for existing rows in the layer. If the layer is a feature layer, you can also update feature locations.
- Add and update features—Performs both of the actions described above.
Note:
Do not use the object ID field or feature ID (FID) field as the unique identifier when you update features.
- If the hosted feature layer contains more than one layer, choose the layer to add to or update and click Next.
- Use one of the following methods to specify the updated file:
- Click Your device, browse to and select the file, and click Open.
- Drag the file from your desktop or File Explorer onto the Update data window.
- Specify which fields in the file correspond to which fields in the layer and click Next.
- If you are updating data, define which fields in the layer and the file uniquely identify each feature or row and which can be used to ensure the correct data from the file updates the correct feature or row in the layer.
- If the file contains date values that store time in a time zone other than UTC, choose that time zone from the Time zone selection drop-down menu.
- If you are updating the data in a feature layer, choose one of the following options:
- Attributes only—Updates nonspatial attribute values only.
- Geometries and attributes—Updates both spatial and nonspatial values.
Note:
If you chose the Add and update features option, added features always contain both attributes and geometries.
- If you are adding features or rows only (not updating), click Add and complete to append the features or rows. If you are updating only or updating and adding features or rows, click Update and complete.
The size of the layer and which options you chose will affect the time it takes to apply updates. As soon as this process completes, the updated layer is available in maps, scenes, and dependent WFS layers and hosted feature layer views.
Rebuild the spatial index
Spatial indexes improve the performance of spatial queries, such as drawing features on a map or searching for features. If you or other editors add features to the layer that are outside the initial extent of the layer, the spatial index becomes outdated and you may need to rebuild it. For example, if your hosted feature layer contained features in only one city and you later append data that adds features across the country, you should rebuild the spatial index for that layer.
In general, if you find the layer is drawing more slowly than it used to and you know a large number of features have been added to the layer outside the initial extent, rebuild the spatial index. Spatial indexes are defined on the spatial field of the feature layer.
Note:
To rebuild the spatial index, sync must be disabled on your hosted feature layer.
Follow these steps to rebuild the spatial index on a layer:
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Click the Settings tab.
- Scroll to the Manage indexes section.
- Ensure the Spatial indexes tab is selected and click Rebuild Indexes.
- Check the box next to the sublayer for which you want to re-create the spatial index and click Rebuild.
Note:
While the spatial index is being re-created, users of the layer will likely see slower performance. If possible, rebuild spatial indexes when the layer is not in use.
Add indexes to attribute fields
Indexes can decrease the time it takes for queries, such as searches or filters, to find the data requested.
If you find that it takes a long time to get results when you filter or apply a definition based on the nonspatial attributes in a table or layer, you can add an index to the field or fields to possibly improve query performance.
You can add attribute indexes to any of the supported field types. If filters or definitions need to find specific words or phrases in a string field, you can add a full-text index.
If users are searching or querying a single field at a time, define an index for that one field. If a single search or query runs against multiple fields, you can define an index on all the fields that are frequently queried together.
It is not recommended that you add indexes to fields that are edited frequently, because it can take longer to update a field that has an index defined on it. There is also no point in adding an index for fields that no one will query.
Note:
To add indexes to attribute fields, sync must be disabled on your hosted feature layer.
Add an attribute index
Follow these steps to add an attribute index to a field or fields in a layer or table in a hosted feature layer:
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Click the Settings tab.
- Scroll to the Manage indexes section.
- Click the Field indexes tab.
- Click the Add index button.
- Choose Attribute and click Next.
- Select the sublayer or table to which the index will be added.
- Select the field to which the attribute index will be added and click Add to list.
To define an index that includes multiple fields, select the additional field and click Add to list again.
You can include up to 16 fields in an attribute index. An index defined on multiple fields is useful for queries that query all the fields at once.
- In nearly all cases, leave the Ascending option set.
You would create a descending order index if the queries that run against the fields are descending order queries.
- If the field to which you are adding the index contains unique values and will always contain unique values, check the box next to Field values are unique to create a unique index.
If there are multiple fields in the index, the combination of values across the multiple fields must be unique if you check the Field values are unique check box. As long as one of the multiple fields contains unique values, the combination of values across all the fields in the index will be unique.
- Click Create index.
The amount of time it takes to create the index depends on how many attributes or rows are in the layer or table.
The index is created and appears in the list of indexes on the Field indexes tab.
Add a full-text index to string attribute fields
Follow these steps to add a full-text index to a string field in a layer or table in a hosted feature layer:
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Click the Settings tab.
- Scroll to the Manage indexes section.
- Click the Field indexes tab.
- Click the Add index button.
- Choose Full text and click Next.
- Select the sublayer or table to which the index will be added.
- Select the string field to which the full-text index will be added and click Add to list.
The field you specify can participate in only one index.
- Click Create index.
The amount of time it takes to create the index depends on how many attributes or rows are in the layer or table.
The index is created and appears in the list of indexes on the Field indexes tab.
Delete attribute or full-text indexes
If you find that the added index has not improved query performance or, worse still, has decreased query or editing performance, you can delete the index.
You can also delete an index if you decide you need an index with a different definition—for example, you want to add a field to the index because two fields are frequently queried together. In that case, you must delete the existing index and create another index that includes all the fields you need in the index.
Note:
Other actions that you perform on the data outside this interface also create indexes. For example, when you configure search for a web map's contents, indexes are created on the layers in the web map. Indexes are also created on the layer's object ID and feature ID. The delete operation is not available for these indexes.
Follow these steps to delete an attribute or full-text index from a layer or table in a hosted feature layer:
- Sign in to the organization as the owner of the hosted feature layer or as an administrator.
- Open the item page for the hosted feature layer.
- Click the Settings tab.
- Scroll to the Manage indexes section.
- Click the Field indexes tab.
- Select the layer or table from which to remove the index.
- Click the Delete button next to the index to remove it from the layer or table.