Filtering Data

Use a filter to select a subset of features for a layer or for theming. For example, if you have a data resource containing all US cities with a property called STATE, you might create the following filter to display only cities in California:

STATE = ‘CA’

The Filter dialog box has two modes: Builder and Advanced. In Builder mode you can only create filters that use valid syntax. In Advanced mode you can create filters using any syntax, even if it is not handled by the Builder. You cannot move from Advanced mode to Builder mode unless filter conditions are valid. Further, a filter with valid syntax is not allowed in the builder if it contains functions or property names that are not in the layer’s data source.

All conditions must be in the following format:

<property> <operator> <constant>

To filter data

  1. Open the layer to edit by doing one of the following:
    • Create a new layer.
    • Double-click an existing layer.
    • Click the layer’s tab if the layer is already open.

    For information about creating a new layer, see Creating New Resources. For information about associating a data resource with a new layer, see Specifying the Data Resource for a Layer.

  2. Open the Filter dialog box by doing one of the following:
    • To select a subset of features for a layer, in the Settings pane of the Layer Editor, in the Feature Data Setup area, for Filter Applied To Data, click […].
    • To select a subset of features for theming, in the Style pane of the Layer Editor, under Scale Ranges, select the scale range to theme. In the style rule grid, click the Condition box.

    For more information about scale ranges, see Understanding Scale Ranges.

  3. In the Filter dialog box, do one of the following:
    • Select Property and then select a property from the list.
    • Select Expression and use the Number Expression dialog box to build an expression.

      For more information, see Building Number Expressions.

  4. Under Conditions and Values, select a relational operator and a value from each list.

    To display available values for the selected property, click Get.

  5. To add conditions, do the following:
    • Click New.
    • Under Operation, click And or Or.
    • To precede the selected condition with the Not boolean operator, under Operations, click Not.
    • Specify a property or expression, condition, and value.
  6. To group and ungroup conditions, select the conditions and click Group Selected Conditions or Ungroup Selected Conditions as needed.
  7. Click OK.
  8. Click File menu Save.