<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Query builder in Select by Attribute, Definition Query, and other places not working with coded domain values in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592683#M93728</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/216705"&gt;@MackenzieCollins&lt;/a&gt;&amp;nbsp;, if you look in Data Design &amp;gt; Fields, what is the Data Type for your Code field ? Then check whether this matches the Field Type set in your Domain.&lt;/P&gt;&lt;P&gt;Your Code values look like numerics but the SQL seems to be treating it as a text string by using single quotes around it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fire_dist = '1'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Mar 2025 10:03:10 GMT</pubDate>
    <dc:creator>ChrisUnderwood</dc:creator>
    <dc:date>2025-03-06T10:03:10Z</dc:date>
    <item>
      <title>Query builder in Select by Attribute, Definition Query, and other places not working with coded domain values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592603#M93721</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are working in ArcGIS Pro 3.4.2.&lt;/P&gt;&lt;P&gt;We added a coded text domain to our hydrants as pictured below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackenzieCollins_0-1741221521848.png" style="width: 334px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127132iF07FD7FEE86F284D/image-dimensions/334x441?v=v2" width="334" height="441" role="button" title="MackenzieCollins_0-1741221521848.png" alt="MackenzieCollins_0-1741221521848.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After populating the field we are trying to query the hydrants by this domain and the query builder looks as follows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MackenzieCollins_1-1741221583210.png" style="width: 548px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/127133iC8B74827EF80D594/image-dimensions/548x74?v=v2" width="548" height="74" role="button" title="MackenzieCollins_1-1741221583210.png" alt="MackenzieCollins_1-1741221583210.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This query does not work. The SQL behind the builder is "&amp;nbsp;&lt;STRONG&gt;fire_dist = '1'&lt;/STRONG&gt; "&lt;/P&gt;&lt;P&gt;The only way to get the query to work is if I input the domain description as the value to query. So the working SQL is "&amp;nbsp;&lt;STRONG&gt;fire_dist = 'Alta FPD' ".&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It would be nice for this to be fixed so we don't have to adjust the drop down values to query data in the builder.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 00:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592603#M93721</guid>
      <dc:creator>MackenzieCollins</dc:creator>
      <dc:date>2025-03-06T00:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Query builder in Select by Attribute, Definition Query, and other places not working with coded domain values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592683#M93728</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/216705"&gt;@MackenzieCollins&lt;/a&gt;&amp;nbsp;, if you look in Data Design &amp;gt; Fields, what is the Data Type for your Code field ? Then check whether this matches the Field Type set in your Domain.&lt;/P&gt;&lt;P&gt;Your Code values look like numerics but the SQL seems to be treating it as a text string by using single quotes around it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;fire_dist = '1'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 10:03:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592683#M93728</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2025-03-06T10:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Query builder in Select by Attribute, Definition Query, and other places not working with coded domain values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592773#M93734</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/197747"&gt;@chrichris&lt;/a&gt;&amp;nbsp;. Thanks for the reply!&lt;/P&gt;&lt;P&gt;They are both text.&lt;/P&gt;&lt;P&gt;I changed the value and description in my domain to match and the query now works as expected.&lt;/P&gt;&lt;P&gt;I still don't really understand why the query didn't work though in the first place. Since I used a domain, shouldn't the value of my domain be what is in my field and be what is queried against? Maybe I don't understand domains enough or the differences between using numeric vs text domains.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 15:29:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/query-builder-in-select-by-attribute-definition/m-p/1592773#M93734</guid>
      <dc:creator>MackenzieCollins</dc:creator>
      <dc:date>2025-03-06T15:29:21Z</dc:date>
    </item>
  </channel>
</rss>

