Filter data in the table

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.

  1. Right-click a stand-alone table in the Contents pane and click Open Open Table.
  2. Alternately, right-click a feature layer in the Contents pane and click Attribute Table Open Table.
  3. At the bottom of the open table, click Show selected records 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 Open Selected, or click Table From Selection Open Selected 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:

  1. Double-click a stand-alone table in the Contents pane to open the Table Properties dialog box.
  2. Alternatively, right-click a feature layer in the Contents pane and click Properties Properties to open the Layer Properties dialog box.
  3. On the Properties dialog box, click the Definition Query page.
  4. 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.
  5. Click Apply to save the expression. Click OK to close the dialog box.

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>.

Tip:

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 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.

Example of keeping only matching records with a join

Note:

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, 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 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, 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 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.

Note:

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 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 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 Filter By 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 attribute table displays a list of filter indicator buttons at the bottom of the table window for Filter By Range Filter By Range, Filter By Time Filter By Time, Filter By Extent Filter By Extent, and Sorting Table is Sorted. 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 Clear sort at the bottom of the table view or right-click the column header and click Custom Sort 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.

Table is being filtered.

Related topics