<?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: Can't return Null when using Attribute Rule (edit/Update) and arcade in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256859#M1642</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am actually trying to edit a different feature&amp;nbsp;class using "Edit", which still does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you are doing does work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;return Null;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2020 18:12:36 GMT</pubDate>
    <dc:creator>TL2</dc:creator>
    <dc:date>2020-05-07T18:12:36Z</dc:date>
    <item>
      <title>Can't return Null when using Attribute Rule (edit/Update) and arcade</title>
      <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256857#M1640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While Null now works in arcade field calculations on Pro 2.5, it still does not work in Attribute Rules while using the edit keyword and update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm" title="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/attribute-rule-dictionary-keywords.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Attribute rule dictionary keywords—Geodatabases | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"result"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;assetid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"edit"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"className"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"electricdistributionassembly"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
        &lt;SPAN class="string token"&gt;"updates"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="string token"&gt;"objectID"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; feature_objectid&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            &lt;SPAN class="string token"&gt;"associationType"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; Null
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The above code will not work.&amp;nbsp; It returns a what I am guessing is an empty field.&amp;nbsp; It does not work on strings or dates.&lt;/P&gt;&lt;P&gt;I need a simple attribute rule that updates a field to "Something" on insert/update and to &amp;lt;Null&amp;gt; on insert/update on "Something Else"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code works except that there is no way to return Null using Attribute Rules &amp;amp; Arcade.&amp;nbsp; You can return a string, date or 0 (in the case of dates&amp;nbsp;12/30/1899).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set to Null and tried to set it to a field that is Null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:40:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256857#M1640</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2021-12-11T12:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can't return Null when using Attribute Rule (edit/Update) and arcade</title>
      <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256858#M1641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am having the exact same problem and came on here to check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I basically want to have a safety mechanism set to where the field users are protected from accidentally typing in the wrong date field in Collector, since we have multiple date fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting the same weird date of 12/30/1899 as well. Here is how my attribute rule is set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/491194_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you heard anything on this yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2020 15:01:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256858#M1641</guid>
      <dc:creator>KeithKatashuk</dc:creator>
      <dc:date>2020-05-06T15:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't return Null when using Attribute Rule (edit/Update) and arcade</title>
      <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256859#M1642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am actually trying to edit a different feature&amp;nbsp;class using "Edit", which still does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you are doing does work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;return Null;&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2020 18:12:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256859#M1642</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2020-05-07T18:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't return Null when using Attribute Rule (edit/Update) and arcade</title>
      <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256860#M1643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, that did the trick. Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2020 19:01:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/256860#M1643</guid>
      <dc:creator>KeithKatashuk</dc:creator>
      <dc:date>2020-05-07T19:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can't return Null when using Attribute Rule (edit/Update) and arcade</title>
      <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/1059350#M5870</link>
      <description>&lt;P&gt;I have the very same problem, i.e. returning an "edit" dictionary with &lt;FONT face="courier new,courier"&gt;null&lt;/FONT&gt; values does not work because&amp;nbsp;&lt;FONT face="courier new,courier"&gt;null&lt;/FONT&gt; is converted to &lt;FONT face="courier new,courier"&gt;0&lt;/FONT&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 11:10:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/1059350#M5870</guid>
      <dc:creator>RalfSchmidt</dc:creator>
      <dc:date>2021-05-19T11:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can't return Null when using Attribute Rule (edit/Update) and arcade</title>
      <link>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/1381763#M6937</link>
      <description>&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/how-to-return-null-in-arcade-with-calculate-field/m-p/207449/highlight/true#M9145" target="_self"&gt;How to return null in Arcade with Calculate Field (python works fine)?&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 18:45:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/can-t-return-null-when-using-attribute-rule-edit/m-p/1381763#M6937</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-02-13T18:45:07Z</dc:date>
    </item>
  </channel>
</rss>

