<?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: Use attribute rule to hard-enforce domain in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1545934#M88934</link>
    <description>&lt;P&gt;Hi KimGarbade, any luck apply this rule to multiple fields at same time?&lt;/P&gt;&lt;P&gt;i managed to get it work but with an error message returned..&lt;/P&gt;</description>
    <pubDate>Sun, 06 Oct 2024 07:10:23 GMT</pubDate>
    <dc:creator>JamesE</dc:creator>
    <dc:date>2024-10-06T07:10:23Z</dc:date>
    <item>
      <title>Use attribute rule to enforce domain</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1152278#M52600</link>
      <description>&lt;P&gt;The &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/an-overview-of-attribute-rules.htm#:~:text=be%20used%20to-,restrict%20values,-for%20an%20attribute" target="_self"&gt;Attribute Rules&lt;/A&gt; documentation says:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Attribute rules are complementary to existing rules used in the geodatabase, such as domains and subtypes. For example, domains can be assigned to an attribute field to aid in the data collection process by providing a list of valid values for editors. Additionally, &lt;STRONG&gt;an attribute rule can be used to restrict values for an attribute field that are not part of the domain&lt;/STRONG&gt; when performing a field calculation. After rules are added to a dataset, they can be evaluated as edits take place or at a later time.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Question:&lt;/P&gt;&lt;P&gt;What is involved in setting up an attribute rule to enforce a &lt;U&gt;coded value&lt;/U&gt; domain? I.e. prevent non-domain values from being entered, even when tools like the field calculator are used.&lt;BR /&gt;- Do we need to hardcode the domain values in an IF statement in Arcade?&lt;BR /&gt;- Or can we reference the domain list in Arcade and use it to dynamically restrict values in a field?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 07:12:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1152278#M52600</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-03-10T07:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use attribute rule to hard-enforce domain</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1152350#M52605</link>
      <description>&lt;P&gt;I wrote a constraint rule (first image below).&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the second image below you can see I added an attribute called DomTest to some test data.&amp;nbsp; I applied a domain call WetDry to that field.&amp;nbsp; Only a value of "WET" or "DRY" is allowed by the domain.&amp;nbsp; I then selected one record and used the field calculator to populate it with "KIM" (a clear violation of the domain) and it let me.&lt;/P&gt;&lt;P&gt;After I applied the constraint rule I tried to update one record again using the field calculator.&amp;nbsp; This time using "TIM" and the constraint rule stopped the edit.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_1-1646861363744.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35992iBDAA4718FF6ADCB5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_1-1646861363744.png" alt="KimGarbade_1-1646861363744.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1646861221409.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35991i49638B2D73984AE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1646861221409.png" alt="KimGarbade_0-1646861221409.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 21:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1152350#M52605</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-03-09T21:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Use attribute rule to enforce domain</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1152667#M52643</link>
      <description>&lt;P&gt;Related:&lt;/P&gt;&lt;PRE&gt;if ($feature.structureheight &amp;gt;= 65)
{
    If (&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;DomainName($feature, 'Material')&lt;/FONT&gt;&lt;/STRONG&gt; == 'Steel')
    { return true; }
    else
    { return false; }
}
Else
{  return true; }&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm#:~:text=(DomainName(%24feature" target="_self"&gt;Validation attribute rule examples&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 18:28:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1152667#M52643</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-03-10T18:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use attribute rule to hard-enforce domain</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1545934#M88934</link>
      <description>&lt;P&gt;Hi KimGarbade, any luck apply this rule to multiple fields at same time?&lt;/P&gt;&lt;P&gt;i managed to get it work but with an error message returned..&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2024 07:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rule-to-enforce-domain/m-p/1545934#M88934</guid>
      <dc:creator>JamesE</dc:creator>
      <dc:date>2024-10-06T07:10:23Z</dc:date>
    </item>
  </channel>
</rss>

