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 Desktop
- You could also create a new geodatabase feature class based on the definition expression.
- Right-click the layer in the table of contents.
- Click Data from the context menu.
- Click Export Data from the pull-right menu.
- Remove the definition expression from your layer.
- Open the Layer Properties dialog box.
- Click the Definition Query tab.
- Select the query in the text box if it is not already selected.
- 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.