To control what data users see, the owner of a hosted feature layer view or an administrator can define what fields or features are available in the view. You can also limit the hosted feature layer view to a specific area by defining a spatial extent. These definitions are saved with the hosted feature layer view and allow you more control over what content people see.
For example, you can create multiple views of a hosted feature layer containing customer information and set different definitions for each view depending on the intended users. For a view you share with a group that will perform spatial analysis, you can hide the fields that store customer names, as the analysts don't need to know this information. For another view that you share with a group concerned with routing deliveries, you can define the view to show only features representing customers who purchased a product that had not yet been delivered.
You set the view definition when you create the view, but you can subsequently change the view definition from the Settings tab of a hosted feature layer view's details page.
Be aware of the following when setting a definition for a hosted feature layer view:
- Only use field or feature definitions if your hosting server is configured to allow only standardized SQL queries.
- You cannot set a field or feature definition or an area of interest on a hosted feature layer view if it has a dependent hosted tile layer.
- Certain configurations are defined on individual fields. If you hide a field used to configure such things as symbology, labels, pop-ups, relationships, and time settings, those configurations no longer function in the hosted feature layer view.
- When you export from a hosted feature layer view that has definitions applied, the exported file will contain only those fields or features that the definition allows.
- Hosted feature layer views you create using the Join Features tool have definitions that include a join to another table. You cannot alter the definition of these hosted feature layer views.
The following steps describe how to edit the definition for a hosted feature layer view from the view's details page:
- Open the hosted feature layer view's details.
- If you are the view's owner, open the details page from the My Content tab of the content page.
- If you are an administrator, either use Search to find the view, or access the view from the My Organization's Content tab of the content page.
- Click the Settings tab.
- Scroll down to the Feature Layer (hosted, view) section and click Update View.
- Click layer names to add them to or remove them from the hosted feature layer view.
The layers that are included in the view have a check mark by their name.
- Click Next to alter the definition for each layer in the view.
- Click the first layer to access the layer's definition options. Use the following options to define what features are included in each layer in the view:
- Add filter—You can filter a view's contents by defining filter expressions for one or more of the fields in the layer.
For example, you can exclude blank (null) field values or only include numeric field values greater than a number that you specify.
To define a filter expression, click Add filter > Add expression and use the drop-down lists to construct the expression.
You can add multiple filter expressions per layer. To do so, click Add expression and define an additional expression. Repeat this step for each filter expression you need to add.
When you have all the filters defined, use the Filter results drop-down menu to define whether a feature must meet all the conditions defined in the filter expression to be included in the view (Match all expressions) or if a feature must meet only one of the filter's expressions to be included in the view (Match at least one expression).
- Area of interest—To limit the features included in the view, define a spatial extent for the layer. Only the features located in that extent will be included in the view.
Click the Polygon or Rectangle button and draw an area on the map. If you want to define the same area of interest for all the layers in the view, click Apply to all layers.
Note:
If you define different areas of interest on each layer in a hosted feature layer view, you cannot enable synchronization.
- Fields—You can exclude fields from the view if the view users do not need to see them. For example, you can exclude fields that contain sensitive information (such as people's names, health information, or age).
To define which fields to include in the view, click Select fields and click the field names to remove them from or add them to the view. To help you determine whether a field should be included or excluded from the view, click the info button next to the field name to see a description of the field. Click Done when you finish defining which fields to include in the view.
Note:
You cannot exclude fields that ArcGIS Enterprise requires. For example, you cannot uncheck system fields such as the layer's ID. You also cannot exclude fields that don't allow null values if you have not set a default value for the field. If no default value is set, editors must have access to nonnullable fields to input values when editing.
- Add filter—You can filter a view's contents by defining filter expressions for one or more of the fields in the layer.
- When you finish editing definition options for a layer, click the arrow next to Layer definitions to return to the list of all layers in the view.
- Repeat steps 6 and 7 for each additional layer definition you need to alter.
- Click Update when you finish all changes to the hosted feature layer view.