Queries

Queries are specific to each feature layer. You add and configure queries on the Queries tab on the Map > Layer page in Manager.

Add a Query to a Layer

To add a query to a layer in Manager:

You can add queries to feature layers only.

  1. In Manager, click Map in the side panel, click the Map Services tab, expand the map service that the layer belongs to, and then click the Edit icon next to the layer.

  2. Click the Queries tab.

  3. Click Add Layer Query to open the Create/Edit Layer Query dialog.

    Create/Edit Layer Query dialog

  4. Type a display name for the query.

    When you create the query, it is identified in the Display Name column in the list of queries on this tab. It is also included in the Viewer in the Saved Queries panel, where it is identified by the display name and described as Administrator Defined.

    Saved Queries in the Viewer

  5. In the Query area:

    1. Select All of the following must be true to use the AND operator in the query, or select At least one of the following must be true to use the OR operator in the query.

    2. In the expression fields, select the query subject in the field on the left. Select the operator for the expression in the center field (the list of operators is dependent on whether the subject represents an alphanumeric or numeric value). Type the value being searched for in the field on the right.

    3. Click Add Condition to add another expression clause to the query.

      If All of the following must be true (the AND operator) is selected, AND expression fields are added to the query.

      If At least one of the following must be true (the OR operator) is selected, OR expression fields are added to the query.

    4. Click Add Subclause to nested an expression within the condition.

      The subclause allows the user to nest an AND or OR expression by selecting the respective option.

  6. Click OK to create the new query and add it to the list of queries on the tab.

  7. Click Save Site.

To reorder list items, click and drag the  Sort handle Click and drag to change the order.

Edit a Query

To edit a query:

  1. In Manager, click Map in the side panel, click the Map Services tab, expand the map service that the layer belongs to, and then click the Edit icon next to the layer.

  2. Select the Queries tab.

  3. To edit a query, click the Edit icon beside the query name and change any of the settings described in Add a Query to a Layer.

  4. Click Apply Changes and Save Site.

Remove a Query

To remove a query:

  1. In Manager, click Map in the side panel, click the Map Services tab, expand the map service that the layer belongs to, and then click the Edit icon next to the layer.

  2. Select the Queries tab.

  3. Click the Remove this item icon beside the query you want to delete.

  4. When the Remove Layer Query dialog opens, click OK to confirm the removal of the query.

    The query disappears from the list.

  5. Click Save Site.