Filtering your table provides a way to work with and focus on a subset of records. You can filter on different requirements, including the following:
- Show selected records
- Use a definition query
- Join matching records
- Filter by map time
- Filter by map range
- Filter by map extent (2D only)
You can perform joins and filter only in tables that have been opened from a map or scene.
Show selected records
To interact with selected records only, consider switching the table display to the Show selected records mode. In Show selected records mode, the table view will only list those records that have been selected in the table. You can change your selection by updating the currently selected features in the map corresponding to the open table or by changing your selection in the table. The table dynamically updates 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 from a map, make sure some features are selected. Right-click the layer in the Contents pane, point to Selection, and click Attribute Table Showing Selection , or click Table From Selection on the Data tab.
Use a layer definition query
Another way to filter the list of records in the table is to define a query expression in the layer properties. To create a 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.
- Select a field and build an expression to define the subset of records and features you want to see. Click Add Clause to define additional filters in the expression.
- Click Apply to save the expression. Click OK to close the dialog box.
If a definition query is added to a layer that has a selection, that selection is reduced to include only those features that also conform to the new definition query.
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 within a map or scene, you can choose to display only the records that match. To do this, uncheck 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 honors the definition query.
Filter by map time
If your map contains time-aware layers or stand-alone tables, the table filters 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 display in the table. By default, the filter is on when time is enabled in the map. To see all the records in the table, you can turn off Filter By Time at the bottom of the table view. You can also access filter options for the table under the Table tab, on the View tab, in the Filter group.
Filter by map range
If your map contains range-aware layers or stand-alone tables, the table filters 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 display in the table. By default, the filter is on when range is enabled in the map. To see all the records in the table, you can turn off Filter By Range at the the bottom of the table view. You can also access filter options for the table under the Table tab, on the View tab, in the Filter group.
You can use time and range filters together. If you have a map that is both time- and range-aware, the table displays records using both filters.
Filter by map extent
Filtering attribute table records using the current map extent is only available in 2D views. 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 at the bottom of the table in the Filters list. Optionally, under the Table tab, on the View tab, in the Filter group, click Extent . As you pan and zoom the map to different extents, the rows in the table update to match. The extent filter is not affected by layer visibility. The table displays records filtered appropriately by map extent even when layer visibility is turned off in the Contents pane or suppressed by a visibility range setting.
How to tell if your table has filtered data
The table displays a list of filter indicator buttons at the bottom of the table window for Filter By Range , Filter By Time , Filter By Extent , and Sorting . The buttons are enabled automatically for the filter operation currently applied and otherwise unavailable. Click a filter button to disable the filter status and display all the records in the table. You can also control Filter by Range, Time, or Extent under the Table tab, on the View tab, in the Filter group. To remove any sorting of records, click the Clear sort button at the bottom of the table view or right-click the column header and click Custom Sort . In the Custom Sort window, click Clear. Alternatively, use the keyboard shortcut Ctrl+Shift+U.
The image below shows the indicator buttons for when the table is being filtered or sorted.