<?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: How to create a year selector from a date field in Dashboard in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016880#M4130</link>
    <description>&lt;P&gt;Josh, thank you so much.&lt;/P&gt;&lt;P&gt;I added the field year_ into Survey123 and just sent a test and it successfully updated the year field..&lt;/P&gt;&lt;P&gt;Now to update all my dashboards with year options.&lt;/P&gt;&lt;P&gt;Thanks again for such a comprehensive reply.&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jan 2021 15:39:55 GMT</pubDate>
    <dc:creator>RachelS</dc:creator>
    <dc:date>2021-01-14T15:39:55Z</dc:date>
    <item>
      <title>How to create a year selector from a date field in Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016793#M4128</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'd like to create a year selector on the dashboard using a date field I have.&lt;/P&gt;&lt;P&gt;Can this be done or do I need to create a year field in Survey123 connect. If I do how do I do that and ensure it's hidden.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 09:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016793#M4128</guid>
      <dc:creator>RachelS</dc:creator>
      <dc:date>2021-01-14T09:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a year selector from a date field in Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016856#M4129</link>
      <description>&lt;P&gt;Without a "year" field, this can be fairly tedious, but it's possible.&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;Without Adding a Field&lt;/FONT&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a &lt;STRONG&gt;Date Selector&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Set &lt;EM&gt;Type&lt;/EM&gt; to &lt;STRONG&gt;Defined Options&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Add an option YYYY with two criteria&lt;OL&gt;&lt;LI&gt;"is or is after", choose &lt;STRONG&gt;Value&lt;/STRONG&gt;, 1/1/YYYY&lt;/LI&gt;&lt;LI&gt;"is or is before", choose &lt;STRONG&gt;Value&lt;/STRONG&gt;, 12/31/YYYY&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Repeat for as many years as you have&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jCarlson_0-1610633915568.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3870i328FFB47638AF74C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jCarlson_0-1610633915568.png" alt="jCarlson_0-1610633915568.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;jCarlson_0-1610633915568.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If your dataset has lots of years, this is a very unappealing option. Add to it the fact that you can't reorder the choices, so you'd better do them in ascending order, or future years will be at the bottom of the list out of sequence.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;Adding a Year Field: Update w/ Field Calculator&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;An alternative would be to add such a field and periodically use the &lt;STRONG&gt;Field Calculator&lt;/STRONG&gt; to populated it based on the date field.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jCarlson_1-1610634168936.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3871iCE817E4B0F2E5FB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="jCarlson_1-1610634168936.png" alt="jCarlson_1-1610634168936.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;jCarlson_1-1610634168936.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Such a task could be scheduled easily enough with the &lt;STRONG&gt;arcgis&lt;/STRONG&gt; python module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="5"&gt;Adding a Year Field: Update Via Survey123 Connect&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Pulling the year out of a date field in Survey123 is not too difficult. With a 'year' field in place, use the&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION2_AF58C0297155474F993CEA115682CED3" target="_self"&gt;&lt;STRONG&gt;format-date()&lt;/STRONG&gt;&lt;/A&gt; expression in the &lt;STRONG&gt;calculation&amp;nbsp;&lt;/STRONG&gt;and&amp;nbsp;&lt;STRONG&gt;default&lt;/STRONG&gt; fields of the XLS speadsheet:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;format-date(now(), '%Y')&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;or&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier"&gt;format-date(${some-other-field}, '%Y')&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Whichever of those expressions meets your needs. Then set the &lt;STRONG&gt;type&lt;/STRONG&gt; column to "hidden". End users will not see the "year" field, but it will be included in form submissions.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2021-01-14 084347.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/3874iEC2687DB28D08533/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-01-14 084347.png" alt="Screenshot 2021-01-14 084347.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Screenshot 2021-01-14 084347.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh and lastly. I don't know if it'll &lt;EM&gt;let&lt;/EM&gt; you, but &lt;STRONG&gt;do not&lt;/STRONG&gt; name your field "year", as that can mess up some internal stuff, it being a "reserved keyword".&lt;/P&gt;&lt;P&gt;However you do it, with a specific field corresponding to the &lt;STRONG&gt;year&lt;/STRONG&gt;, you simply create a &lt;STRONG&gt;Category Selector&lt;/STRONG&gt;, select &lt;STRONG&gt;Grouped Values&lt;/STRONG&gt;, then choose your year field as the &lt;STRONG&gt;Category Field&lt;/STRONG&gt;. Then your selector will auto-populated with new values as submissions come in.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 14:51:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016856#M4129</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-01-14T14:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a year selector from a date field in Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016880#M4130</link>
      <description>&lt;P&gt;Josh, thank you so much.&lt;/P&gt;&lt;P&gt;I added the field year_ into Survey123 and just sent a test and it successfully updated the year field..&lt;/P&gt;&lt;P&gt;Now to update all my dashboards with year options.&lt;/P&gt;&lt;P&gt;Thanks again for such a comprehensive reply.&lt;/P&gt;&lt;P&gt;Rachel&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 15:39:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/how-to-create-a-year-selector-from-a-date-field-in/m-p/1016880#M4130</guid>
      <dc:creator>RachelS</dc:creator>
      <dc:date>2021-01-14T15:39:55Z</dc:date>
    </item>
  </channel>
</rss>

