<?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: Validation problem with checking domains compliance in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382264#M78754</link>
    <description>&lt;P&gt;Thanks!&amp;nbsp; &amp;nbsp;I will try this out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2024 16:12:29 GMT</pubDate>
    <dc:creator>DeanAnderson2</dc:creator>
    <dc:date>2024-02-14T16:12:29Z</dc:date>
    <item>
      <title>Validation problem with checking domains compliance</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1381301#M78660</link>
      <description>&lt;P&gt;I am testing validation rules.&amp;nbsp; We have imported a lot of data and I want to implement validation rules to assist users in reviewing attribute values that need to be in the attribute domain.&amp;nbsp; I am using ArcPro 3.2+.&amp;nbsp; (I know I can do this from with the Attributes tab but want to use attribute validation rules. )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have a domain with ALL county values 1-36 for a field called County.&amp;nbsp; In my feature class (Taxcode) I selected a polygon and assigned it a null value (putting it outside the domain).&amp;nbsp; I have created a couple of different arcade scripts to do the validation but both return all features in error when using the error inspector.&amp;nbsp; I have looked at available examples and can not find this specific example.&amp;nbsp; I did find code that looks at pole heights and another that includes subtypes.&amp;nbsp; I have not been successful at using these examples to create my own SIMPLE approach.&amp;nbsp; Here are the two ways I have done it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example 1:&amp;nbsp;&lt;/P&gt;&lt;P&gt;return (Includes(Domain($feature,'County').codedvalues,$feature.County))&lt;/P&gt;&lt;P&gt;Example 2:&amp;nbsp;&lt;/P&gt;&lt;P&gt;var CountyDomains = Domain($feature,'County')&lt;BR /&gt;var ValidCodes = []&lt;BR /&gt;var ValidCodes = CountyDomains["codedValues"]&lt;BR /&gt;return (Includes(ValidCodes,$feature.County))&lt;/P&gt;&lt;P&gt;Both are valid expressions.&amp;nbsp; In the error inspector both identify all features in the feature class as being in error.&amp;nbsp; &amp;nbsp;Its got to be doing something simple.&amp;nbsp; What am I doing wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:55:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1381301#M78660</guid>
      <dc:creator>DeanAnderson2</dc:creator>
      <dc:date>2024-02-12T20:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Validation problem with checking domains compliance</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382244#M78753</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/337997"&gt;@DeanAnderson2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found an example that should work for you:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function exists(ar, e) {
    for (var i = 0; i &amp;lt; count(ar); i++)
        if (ar[i].code == e) return true
    return false
} 
//get the domain
var d = Domain ($feature, "County");

//search the domain and see if the value is inside the domain.
return exists(d.codedValues, $feature.County);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From&amp;nbsp;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/domain-subtypes-and-the-schema-arcade-functions-in-arcgis-pro-2-6/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/data-management/domain-subtypes-and-the-schema-arcade-functions-in-arcgis-pro-2-6/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 15:33:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382244#M78753</guid>
      <dc:creator>Scott_Harris</dc:creator>
      <dc:date>2024-02-14T15:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Validation problem with checking domains compliance</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382264#M78754</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp; &amp;nbsp;I will try this out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 16:12:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382264#M78754</guid>
      <dc:creator>DeanAnderson2</dc:creator>
      <dc:date>2024-02-14T16:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Validation problem with checking domains compliance</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382271#M78756</link>
      <description>&lt;P&gt;It worked great - Thanks.&amp;nbsp; I am not sure why mine did not but I do not care and will do a bit more research on why.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Feb 2024 16:17:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/validation-problem-with-checking-domains/m-p/1382271#M78756</guid>
      <dc:creator>DeanAnderson2</dc:creator>
      <dc:date>2024-02-14T16:17:51Z</dc:date>
    </item>
  </channel>
</rss>

