In addition to securing layers and fields with permissions, VertiGIS Studio Access Control provides attribute filters that let you specify exactly which features your users can see in your GIS applications.
For example, you might want to:
- Let all users view a layer and its fields, but allow them to only see a subset of features.
- Let a group of users view a layer and its fields, but restrict an individual user's access so that they only see the features they need to work with.
Attribute filters are constructed using a Structured Query Language (SQL) expression (WHERE clause) that selects features or table records that match the selection criteria.
Before you begin creating attribute filters, note the following:
- Attribute filters apply to both editable and visible layers.
- Attribute filters are applied to a specific user or group of users. To add a filter, you must know the name of the user or group.
- You must know the attribute criteria for the feature you want to filter. Review the feature attributes in your GIS map or application and decide which values you want to filter on.
The following procedure shows how to add an attribute filter for a user or group.
The example application includes a layer called Airports, which shows airports in the LA region. The image below centers on the Palmdale area.
Seven airports are visible on the map:
- The three airports highlighted with orange circles are located in the city of Palmdale.
- The four airports highlighted with green squares are located in other cities.
The following steps filter out the four airports that are not located in Palmdale.
To add an attribute filter
Open the Access Control Designer, and then drill down and select the service layer or table on which you want to apply the filter. (See Add Layer Permissions, steps 1- 2.)
In the Permissions for Layer/Table Name panel, click Attribute Filters. The Attribute Filters for Layer/Table Name panel opens.
In the Attribute Filters for Layer/Table Name panel, click Add. The Select a User or Group dialog box opens.
In the Select a User or Group dialog box, in the drop-down list on the right, choose whether to search by Group or by User.
Start typing the name of the group/user into the text box, and then select from the drop-down list that displays.
In the Filter Rules table, type the filter condition to apply to the feature. For details, see Filter Expression Syntax and Operators, below.
The following image shows the example application with the attribute filter applied. Now, only the three airports located in Palmdale display on the map.
Attribute filters are SQL 'WHERE clauses' that are appended to the query operations performed on the ArcGIS Server. In the simple example shown above, the 'is equal to' (=) operator tells Access Control to only display features where the value of the City field is 'Palmdale'.
Access Control filter expressions follow the same syntax rules as ArcGIS Server queries and support the same operators. For details, sees the Request parameters WHERE clause descriptions provided in the following ArcGIS documentation:
If you configure multiple attribute filters for the same user or group, the filters are not merged. Instead, inheritance rules apply and the highest precedence filter is used. For details, see Combining permissions and filters.