Open topic with navigation
You can restrict the features that different users see by filtering the features. Filtering is based on the values of feature attributes. For example, you might want county inspectors to see only the parcels in the city where they work. In this case, filtering is based on the City attribute of the Parcels layer.
Feature filtering can be used for ArcGIS Server map services and feature services only.
ArcGIS Server should be behind a firewall. If ArcGIS Server is not behind a firewall, a user could bypass feature filtering by making requests directly to ArcGIS Server.
Essentials implements filtering by attaching a "where" clause to requests made to ArcGIS Server. Where clauses are used in queries and map image requests to filter the data returned by the query.
Each where clause is built by a workflow that is associated with a particular layer. Whenever a request is made to access a layer, Essentials runs the workflow for that layer, if there is one, and then attaches the where clause to the request. A workflow that filters features in a layer is called a layer filter workflow.
In order for a feature to be included in the response, it must satisfy the condition in the where clause. For example, a Parcels layer request with the where condition
"City='Paris'" returns only parcels that have Paris as the value of the City attribute.
In tiled map services, it is not possible to prevent users from seeing filtered features in the map image, because the tiles are pre-generated. However, filtering applies to operations that access feature data, such as query and identify operations.
Role of Essentials Security in Feature Filtering
When a site has a layer filter configured for at least one layer in an ArcGIS Server map service, requests to that map service get proxied through the Layer Security proxy. The proxying of requests enables Essentials to intercept requests to ArcGIS Server so it can attach the where clause. This means that in order to filter one or more layers in a site, the site must have security enabled.
To set up filtering for a layer:
Configure Essentials Security.
See Security for information.
Launch Workflow Designer and create a layer filter workflow to build the where clause.
Add the workflow to the layer.
Follow the instructions below.
To add a layer filter workflow to a layer:
Do this after you have created the workflow.
Follow the instruction that applies to you:
Feature Layer: If the layer that you want to filter is from a feature service, edit the layer.
Map Service Static Layer: If the layer that you want to filter is a static layer from a map service, edit the layer.
Map Service Dynamic Layer: If the layer that you want to filter is a dynamic layer form a map service, edit the map service.
Because dynamic layers are created at run time, the layer filter workflow is configured at the map service level instead of the layer level. Note that you do not have to add the workflow to Manager's Workflows page.
On the Details tab, click the Browse button beside the Filter Workflow URI box.
Locate the workflow (
.xaml) file, select the file, and then click OK.
Click Apply Changes.