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:

  • 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 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 always change your selection either by updating the currently selected features in the map corresponding to the open table, or by changing your selection in the table. The able will dynamically update 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.

Tip:

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 Open Selected, or click Table From Selection Open Selected 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:

  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. Click Add Clause.
  5. Build an expression to define the subset of records and features you want to see.
  6. 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>.

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

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 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 Map 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 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 Map 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:

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

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

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 Map Range, Filter By Time Map Time, Filter By Extent Filter By Extent and Sorting Custom Sort. The icons are enabled automatically for the filter operation currently applied and otherwise greyed out. Click a filter icon 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, right-click on the column header and click Custom Sort 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.

Table is being filtered

Related topics