PROBLEM

Unable to query Boolean fields in the Select Layer By Attribute tool

Last Published: October 24, 2025

Description

In ArcGIS Pro, when running the Select Layer By Attribute tool on a Boolean field, the following error message is returned:

Error:
ERROR 999999: Something unexpected caused the tool to fail.

Cause

This is a known limitation in ArcGIS Pro. Boolean fields are not natively supported. When read from a database, Boolean fields are displayed as short integer values in the attribute table, but they do not behave as true numeric fields. This mismatch causes the Select Layer By Attribute tool to fail.

Solution or Workaround

As a workaround, create a new short integer field data type with a coded value domain and run the Select Layer By Attribute tool.

  1. Open the ArcGIS Pro project containing the polygon feature layer.
  2. Create a new short integer field data type in the attribute table and add a coded value domain. Refer to ArcGIS Pro: Create a field and apply a domain and default value for more information.
    1. In the Contents pane, right-click the feature layer and click Attribute Table.
    2. Click Add to open the Fields view.
    3. For Field Name, specify a name for the new field. In this example, the field name is set to Has_Data.
    4. For Data Type, click the drop-down arrow and select Short.
    5. For Domain, click the drop-down arrow and select <Add New Coded Value Domain>.
    6. In the Domains view, in the Code column, click the domain value code cell, and insert a value for the domain. In this example, the value is set to 0.
    7. In the Description column, double-click the empty cell, and insert a value for the domain. In this example, the value is set to False.
    8. Repeat Steps 2(f) and 2(g) to insert a second code of value 1 and the description as True. Click Save.
    The image of the coded value domain added to the dataset
    1. On the Fields ribbon tab, under the Manage Edits group, click Save.
  3. In the attribute table, under the newly created field, double-click the <Null> cells, and select True or False. Alternatively, refer to How To: Apply the coded value domain description to a field in ArcGIS Pro to batch populate the new field with the coded domain values.
  4. Run the Select Layer By Attribute tool using the new field. Refer to ArcGIS Pro: Select Layer By Attribute (Data Management) for more information.
    1. On the ribbon, click the Analysis tab.
    2. On the Analysis tab, in the Geoprocessing group, click Tools.
    3. In the Geoprocessing pane, search for and select the Select Layer By Attribute tool.
    4. In the Select Layer By Attribute pane, for Input Rows, click the drop-down arrow and select the polygon feature layer.
    5. For Selection Type, click the drop-down arrow and select New selection.
    6. For SQL Expression, click Add Clause if necessary, and define the clause. In this example, the clause is set to 'Has_Data is equal to 1 - True'.
    7. Click Run.

The image below shows the Select Layer By Attribute tool run successfully when querying the new short integer field.

The Select Layer By Attribute pane

Article ID: 000038064

Software:
  • ArcGIS Pro

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options