Hello,
We are working in ArcGIS Pro 3.4.2.
We added a coded text domain to our hydrants as pictured below.
After populating the field we are trying to query the hydrants by this domain and the query builder looks as follows.
This query does not work. The SQL behind the builder is " fire_dist = '1' "
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 " fire_dist = 'Alta FPD' ".
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.
Hello @MackenzieCollins , if you look in Data Design > Fields, what is the Data Type for your Code field ? Then check whether this matches the Field Type set in your Domain.
Your Code values look like numerics but the SQL seems to be treating it as a text string by using single quotes around it.
fire_dist = '1'
Hello @chrichris . Thanks for the reply!
They are both text.
I changed the value and description in my domain to match and the query now works as expected.
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.