<?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: Control Open/Close Survey Date Range Programmatically in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1349552#M52859</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/598171"&gt;@GregReinecke&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The open/closed setting is saved in the form.json file (settings.openStatusInfo) for a survey published from the Survey123 website or the &amp;lt;surveyName&amp;gt;.info file for a survey published from Survey123 Connect. Technically, you can use a script to update this setting in the file and then update the .zip file at the &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/item-data.htm" target="_blank" rel="noopener"&gt;/data&lt;/A&gt; endpoint of the form item.&lt;/P&gt;&lt;P&gt;If your survey was published in Survey123 Connect, another workaround might be utilizing the `format-date(${date1}, '%a')` function to get the day of today. Then set corresponding questions to be always invalid and required or hidden to achieve the goal.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZhifangWang_0-1700038301305.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86018i3CBA49BDE515E363/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZhifangWang_0-1700038301305.png" alt="ZhifangWang_0-1700038301305.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 08:51:49 GMT</pubDate>
    <dc:creator>ZhifangWang</dc:creator>
    <dc:date>2023-11-15T08:51:49Z</dc:date>
    <item>
      <title>Control Open/Close Survey Date Range Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1349007#M52819</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Every week I'd like to automatically Open a survey on Sunday and Close it on Thursday.&amp;nbsp; I know I can control the survey based on a specific Date range by interactively opening the Survey123 app but&amp;nbsp;could I reset the&amp;nbsp; Date range in the survey via Connect or a script or Model Builder?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;GR&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2023 23:58:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1349007#M52819</guid>
      <dc:creator>GregReinecke</dc:creator>
      <dc:date>2023-11-13T23:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: Control Open/Close Survey Date Range Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1349552#M52859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/598171"&gt;@GregReinecke&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The open/closed setting is saved in the form.json file (settings.openStatusInfo) for a survey published from the Survey123 website or the &amp;lt;surveyName&amp;gt;.info file for a survey published from Survey123 Connect. Technically, you can use a script to update this setting in the file and then update the .zip file at the &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/item-data.htm" target="_blank" rel="noopener"&gt;/data&lt;/A&gt; endpoint of the form item.&lt;/P&gt;&lt;P&gt;If your survey was published in Survey123 Connect, another workaround might be utilizing the `format-date(${date1}, '%a')` function to get the day of today. Then set corresponding questions to be always invalid and required or hidden to achieve the goal.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZhifangWang_0-1700038301305.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86018i3CBA49BDE515E363/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZhifangWang_0-1700038301305.png" alt="ZhifangWang_0-1700038301305.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 08:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1349552#M52859</guid>
      <dc:creator>ZhifangWang</dc:creator>
      <dc:date>2023-11-15T08:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: Control Open/Close Survey Date Range Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1351313#M52956</link>
      <description>&lt;P&gt;The Survey123 Connect solution did the trick. I created some Python to run in the windows task scheduler to update the .info file every Sunday.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now to complete the challenge I have to publish the survey so the changes to the .info file take effect. Can this be automated?&lt;/P&gt;&lt;P&gt;Thank you so much ZhifangWang!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 03:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1351313#M52956</guid>
      <dc:creator>GregReinecke</dc:creator>
      <dc:date>2023-11-20T03:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: Control Open/Close Survey Date Range Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1351327#M52957</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/598171"&gt;@GregReinecke&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;In Survey123 Connect or Survey123 website, publishing a survey actually does two jobs: 1. update the .zip package for the form item, 2. create/maintain the behind feature layer. For your case, only updating the .zip package for the form item needs to be done.&lt;/P&gt;&lt;P&gt;To complete this, you can use Python script to:&lt;/P&gt;&lt;P&gt;1. Download the .zip package file of the form item at &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/item-data.htm" target="_blank" rel="noopener"&gt;/data&lt;/A&gt; endpoint.&lt;/P&gt;&lt;P&gt;2. Update the .info file inside the package file.&lt;/P&gt;&lt;P&gt;2. Update the /data of the form item with the updated package file by using the &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm" target="_blank" rel="noopener"&gt;/update&lt;/A&gt; item endpoint.&lt;/P&gt;&lt;P&gt;This should save you from publish the survey manually in Survey123 Connect.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 06:03:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1351327#M52957</guid>
      <dc:creator>ZhifangWang</dc:creator>
      <dc:date>2023-11-20T06:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Control Open/Close Survey Date Range Programmatically</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1351398#M52961</link>
      <description>&lt;P&gt;Thank you. This is the kickstart I needed. Plenty of guidance on the web on how to implement your info. Looking forward to working through it. Thanks again&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;@&lt;/SPAN&gt;&lt;SPAN class=""&gt;ZhifangWang.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 11:54:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/control-open-close-survey-date-range/m-p/1351398#M52961</guid>
      <dc:creator>GregReinecke</dc:creator>
      <dc:date>2023-11-20T11:54:48Z</dc:date>
    </item>
  </channel>
</rss>

