Skip To Content

00065: Layer has a definition expression

In this topic

Your layer has a definition query and you are publishing a service with Feature Access (feature service) enabled.

Solution

  • One way to keep the definition expression in the layer you want to publish is to create a view. A view is a stored query that selects data from specified tables.

    Learn more about views and creating a database view in ArcGIS for Desktop

  • You could also create a new geodatabase feature class based on the definition expression.
    1. Right-click the layer in the table of contents.
    2. Click Data from the context menu.
    3. Click Export Data from the pull-right menu.
  • Remove the definition expression from your layer.
    1. Open the Layer Properties dialog box.
    2. Click the Definition Query tab.
    3. Select the query in the text box if it is not already selected.
    4. Press the DELETE key on your keyboard.

More information

When you specify a dataset that you want to draw as a map layer, you often only want to draw some of the features in the dataset. In these situations, you can define a query expression to select a subset of features for the layer display. This is referred to as a definition expression or definition query.

Learn more about displaying a subset of features in a layer