Filtering your table provides a way to work with and focus on a subset of records. You can filter on different requirements, including:
- Show selected records
- Use a definition query
- Join matching records
- Filter by map time
- Filter by map range
- Filter by map extent (2D only)
Show selected records
To interact with selected records, consider switching the table display to the Show selected records mode. In Show selected records mode, you will see only those records that have been selected in the table. You can always change your selection, and the table will update to reflect the current selection set.
- Right-click a stand-alone table in the Contents pane and click Open .
- Alternately, right-click a feature layer in the Contents pane and click Attribute Table .
- At the bottom of the open table, click Show selected records .
To open a table directly in Show selected records mode, make sure some features are selected on the map. Right-click the layer in the Contents pane, point to Selection, and then click Attribute Table Showing Selection , or click Table From Selection on the Data tab.
Use a definition query
Another way to filter the list of records in the table is to define a query expression.
To create a new definition query, do the following:
- Double-click a stand-alone table in the Contents pane to open the Table Properties dialog box.
- Alternatively, right-click a feature layer in the Contents pane and click Properties to open the Layer Properties dialog box.
- On the Properties dialog box, click the Definition Query page.
- Click Add Clause.
- Build an expression to define the subset of records and features you want to see.
- Click Add to add the expression. Click OK to close the dialog box.
See Write a query in the query builder for more information on how to build valid queries.
To remove a definition query, select the appropriate layer or stand-alone table in the Contents pane. On the Data tab, in the Definition Query group, change the drop-down list setting to <None>.
You can also start a definition query from the ribbon when a layer or stand-alone table is selected in the Contents pane. On the Data tab, in the Definition Query group, click the Dialog Box Launcher .
Join with only matching records
If you are joining tables, you can choose to display only the records that match. To do this, clear the Keep All Target Features check box in the Add Join tool.
If a record in the target table doesn't have a match in the join table, that record is removed from the result target table. If the target table is the attribute table of a layer, features that don't have data joined to them are not shown on the map.
If either the join table or the target table has a definition query applied to it, the result target table will honor the definition query.
Filter by map time
If your map contains time-aware layers, the table will filter records based on the current map time. As you step or play the time slider in the map view, only the records that fall within the current span will display in the table. By default, the filter is on when time is enabled in the map. If you want to see all the records in the table, you can turn off Filter By Time in the Filter group on the View tab for the table.
Filter by map range
If your map contains range-aware layers, the table will filter records based on the current map range. As you step or play the range slider in the map view, only the records that fall within the current span will display in the table. By default, the filter is on when range is enabled in the map. If you want to see all the records in the table, you can turn off Filter By Range in the Filter group on the View tab for the table.
Time and range filters can be used together. If you have a map that is both time- and range-aware, the table will display records using both filters.
Filter by map extent
To filter the table view to show only records that correspond to features in the visible geographic extent of the map, click Filter By Extent in the Filter group on the View tab for the table. As you pan and zoom the map to different extents, the rows in the table will update to match. The extent filter is not affected by layer visibility. The table will display records filtered appropriately by map extent even when layer visibility is turned off in the Contents pane or suppressed by a visibility range setting.
Filtering table records using the current map extent is only available in 2D views.
How to tell if your table has filtered data
The attribute table displays a list of filter indicator icons at the bottom of the table window for Filter By Range , Filter By Time , Filter By Extent and Sorting . These icons are for informational purposes only and do not change the filter status. The icons are enabled for the filter operation currently applied and otherwise greyed out. Controlling whether Filter by Range, Time, or Extent are turned on or off is on the View tab for the table. To remove any sorting of records, right-click on the column header and click Custom Sort . On the Custom Sort window, click Clear.
The image below shows the indicator icons for when the table is being filtered or sorted.