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 size 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's details 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 details 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 any files to be attached to your layer, open the sublayer's details page and disable the toggle button next to Enable attachments. Be aware, though, that this removes all existing attachments from the layer and prevents people from adding any 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 details 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 details 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's details 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.
- 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 details 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.
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 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.