Note:
Filter by Attributes is only available in ModelBuilder.
The Filter by Attributes model tool creates an output data variable of features that meet attribute criteria.
The output is an output data variable that can be configured as an intermediate layer or a hosted layer.
Example
Wildlife management officials are concerned about interactions between cougars and humans and decide to create a model to map potential cougar habitat. The habitat will be based on criteria such as vegetation, slope, and proximity to roads. Filter by Attributes can be used in the model to filter the vegetation layer to only vegetation types that are suitable for cougar habitat.
Usage notes
Filter by Attributes includes configurations for query criteria and result layer.
Query criteria
The Query criteria group includes the following parameters:
- Input dataset specifies whether the input is a hosted feature layer or a hosted table layer. You can choose a dataset by clicking Layer
.
- Expression defines the criteria used to filter features. Those features that satisfy all criteria will be included in the output data variable. To define a query, click Build new query. An input dataset must be specified to edit the expression.
Learn more about building a query
Note:
In most cases, the query builder includes a list of available field values to aid in building an accurate expression. The list is not available if the input dataset is an output from another tool. You must type the exact value into the input box, rather than choosing the value from a list.
Result layer
The Result layer group includes the following parameters:
- Result type specifies whether the output is an intermediate layer or a hosted feature layer. The following options are available:
- Create intermediate data creates a temporary dataset that can be used as an input to another tool element. This is the default for all tools in a model.
- Create hosted layer creates a new hosted layer for the output dataset. If this option is chosen, the following parameters are available:
- Output name specifies the name of the layer that is created and displayed. The name must be unique. If a layer with the same name already exists in your organization, the tool will fail and you will be prompted to use a different name.
- If a layer exists with the same name, automatically overwrite it determines whether the model can be rerun without changing the name for the output layer. If the layer does not already exist in the organization, a new layer will be created on the first run of the model and will be overwritten in subsequent model runs. The parameter is enabled by default.
- Save in folder specifies the name of a folder in My content where the result will be saved.
- Overwrite existing layer specifies an existing hosted layer that will be overwritten by the tool output. If this option is chosen, the Layer to overwrite parameter is also available to browse to an existing layer.
Limitations
The following limitations apply to the tool:
- Filter by Attributes is only available in ModelBuilder. If you are not using ModelBuilder, you can apply a filter to a dataset or use Find by Attributes and Location.
- Spatial expressions are not supported.
- Lists of field values are not available in the query builder when the input layer or table is an output from another tool.
Environments
This tool does not honor analysis environments.
Credits
This tool does not consume credits.
Outputs
Filter by Attributes creates an output data variable that may be intermediate or hosted data. The output dataset has the same geometry and fields as the input dataset.
Licensing requirements
This tool requires the following user type and configurations:
- Professional or Professional Plus user type
- Publisher, Facilitator, or Administrator role, or an equivalent custom role
Resources
Use the following resources to learn more:
- How to build a query
- Filter by attribute in ArcGIS Data Pipelines
- Find by Attributes and Location in ArcGIS Online