<?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 What am I doing wrong? Arcade to populate year from editor tracking in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/what-am-i-doing-wrong-arcade-to-populate-year-from/m-p/60130#M2525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a YEAR field, controlled by a domain (1950-2030). The user can choose to pick a year from the picklist or do nothing, in which case&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="token function"&gt;Year&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CREATEDATE&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will populate the year correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I use&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;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YEAR &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; null&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;Year&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CREATEDATE&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YEAR&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and do not pick a year from the picklist, nothing happens. The year is not populated.&lt;/P&gt;&lt;P&gt;So what I'm trying to do is have Arcade ignore the user input, but if the user inputs nothing, perform the calculation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:17:26 GMT</pubDate>
    <dc:creator>ThomasColson</dc:creator>
    <dc:date>2021-12-10T22:17:26Z</dc:date>
    <item>
      <title>What am I doing wrong? Arcade to populate year from editor tracking</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-am-i-doing-wrong-arcade-to-populate-year-from/m-p/60130#M2525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a YEAR field, controlled by a domain (1950-2030). The user can choose to pick a year from the picklist or do nothing, in which case&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="token function"&gt;Year&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CREATEDATE&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;will populate the year correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I use&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;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YEAR &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; null&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token function"&gt;Year&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;CREATEDATE&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;YEAR&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and do not pick a year from the picklist, nothing happens. The year is not populated.&lt;/P&gt;&lt;P&gt;So what I'm trying to do is have Arcade ignore the user input, but if the user inputs nothing, perform the calculation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:17:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-am-i-doing-wrong-arcade-to-populate-year-from/m-p/60130#M2525</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2021-12-10T22:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: What am I doing wrong? Arcade to populate year from editor tracking</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/what-am-i-doing-wrong-arcade-to-populate-year-from/m-p/60131#M2526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the IsEmpty function around $feature.year instead of == null&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2020 16:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/what-am-i-doing-wrong-arcade-to-populate-year-from/m-p/60131#M2526</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2020-02-12T16:55:31Z</dc:date>
    </item>
  </channel>
</rss>

