<?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 Can I Turn Off Survey Programmatically? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1233705#M46151</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Having the existing ability to turn a survey off based on a date setting/range is incredibly helpful within Survey123. However, if I wanted to turn the survey off based on a MAX count of something for example, I'm a bit stumped. Is there a way in Survey123 to do this programmatically via Arcade or a script OR if for example the survey was being deployed through a widget in Experience Builder would it make more sense to deal with it there?&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;GR&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2022 12:48:48 GMT</pubDate>
    <dc:creator>GregReinecke</dc:creator>
    <dc:date>2022-11-21T12:48:48Z</dc:date>
    <item>
      <title>Can I Turn Off Survey Programmatically?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1233705#M46151</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Having the existing ability to turn a survey off based on a date setting/range is incredibly helpful within Survey123. However, if I wanted to turn the survey off based on a MAX count of something for example, I'm a bit stumped. Is there a way in Survey123 to do this programmatically via Arcade or a script OR if for example the survey was being deployed through a widget in Experience Builder would it make more sense to deal with it there?&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;GR&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 12:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1233705#M46151</guid>
      <dc:creator>GregReinecke</dc:creator>
      <dc:date>2022-11-21T12:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Turn Off Survey Programmatically?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1233843#M46161</link>
      <description>&lt;P&gt;Hi.&amp;nbsp; Using the new pulldata("@layer") function you can count the number of records submitted to a survey (granted that your survey layer has query capabilities enabled).&amp;nbsp; &amp;nbsp;With that, you can build a constraint to prevent further submits, and show a message indicating that the survey is closed.&lt;/P&gt;&lt;P&gt;Check out &lt;A href="https://community.esri.com/t5/arcgis-survey123-videos/survey123-tricks-of-the-trade-live-query-arcgis/m-p/1228072#M54" target="_blank" rel="noopener"&gt;this video&lt;/A&gt; on minute 22:10, as it describes how to do it. Also some additional help in &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-layer/ba-p/1224415" target="_blank" rel="noopener"&gt;this blog&lt;/A&gt;, and this &lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_BB97985CAFB740EE8AEF99EFD6E238E3" target="_blank" rel="noopener"&gt;help topic&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;The above is not quite the same as 'closing the survey', but it may do it for you.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 17:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1233843#M46161</guid>
      <dc:creator>IsmaelChivite</dc:creator>
      <dc:date>2022-11-21T17:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can I Turn Off Survey Programmatically?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1234342#M46193</link>
      <description>&lt;P&gt;Ismael,&lt;/P&gt;&lt;P&gt;The video and links have been very helpful. I feel like I am almost there. Below&amp;nbsp;&lt;/P&gt;&lt;P&gt;type&amp;nbsp; &amp;nbsp; &amp;nbsp; name&amp;nbsp; &amp;nbsp; &amp;nbsp; label&amp;nbsp; &amp;nbsp; &amp;nbsp; hint&lt;/P&gt;&lt;TABLE width="699"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;TD&gt;creation_date&lt;/TD&gt;&lt;TD&gt;Creation Date:&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;select_one list_name&lt;/TD&gt;&lt;TD&gt;event_date&lt;/TD&gt;&lt;TD&gt;Choose Your Event Date&lt;/TD&gt;&lt;TD&gt;&amp;lt;i&amp;gt;Choose a date.&amp;lt;/i&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;text&lt;/TD&gt;&lt;TD&gt;last_name&lt;/TD&gt;&lt;TD&gt;Last Name&lt;/TD&gt;&lt;TD&gt;&amp;lt;i&amp;gt;Type last name here.&amp;lt;/i&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;text&lt;/TD&gt;&lt;TD&gt;first_name&lt;/TD&gt;&lt;TD&gt;First Name(s)&lt;/TD&gt;&lt;TD&gt;&amp;lt;i&amp;gt;Type first name(s) here.&amp;lt;/i&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;integer&lt;/TD&gt;&lt;TD&gt;fridayAdult&lt;/TD&gt;&lt;TD&gt;Adult(s) Attending Friday&lt;/TD&gt;&lt;TD&gt;&amp;lt;i&amp;gt;Enter # of adults.&amp;lt;/i&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;calculate&lt;/TD&gt;&lt;TD&gt;my_layer_url&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;calculate&lt;/TD&gt;&lt;TD&gt;my_query_url&lt;/TD&gt;&lt;TD&gt;URL&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;integer&lt;/TD&gt;&lt;TD&gt;record_count&lt;/TD&gt;&lt;TD&gt;Record Count&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculation&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; constraint&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;constraint_message&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; relevant&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;choice_filter&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; repeat_count&lt;/P&gt;&lt;TABLE width="1041px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;int(${fridayAdult})&amp;gt;0 and int(${fridayAdult})&amp;lt;=10&lt;/TD&gt;&lt;TD width="285.703px"&gt;Value must be between 1 and 10&lt;/TD&gt;&lt;TD width="205.953px"&gt;${event_date}='date_1'&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="410.656px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="285.703px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="205.953px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="1040.31px"&gt;string("&lt;A href="https://services8.arcgis.com/m2qDIZgo1Sbgu0rc/arcgis/rest/services/service_f753da0c124141f08727800703f0b17c/FeatureServer/0" target="_blank" rel="noopener"&gt;https://services8.arcgis.com/m2qDIZgo1Sbgu0rc/arcgis/rest/services/service_f753da0c124141f08727800703f0b17c/FeatureServer/0&lt;/A&gt;")&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="1040.31px"&gt;concat(${my_layer_url},"?outStatistics=[{'statisticType': 'count','onStatisticField': 'objectid','outStatisticFieldName': 'fridayAdult'}]")&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="948.297px"&gt;pulldata("@layer","getValue","attributes.fridayAdult",${my_query_url},"1=1")&lt;/TD&gt;&lt;TD width="45.9844px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="46.0312px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for the messy table but for the most part the entries are as you have them in your demo.&lt;/P&gt;&lt;P&gt;My thought/hope would be that the concat calculation would act as a running sum "fridayAdult"&amp;nbsp; (ie total count of all the record entry values added together) which I could then use with constraints to alert the user the max fridayAdult count had been reached say at 10.&lt;/P&gt;&lt;P&gt;Am I misinterpreting all this? Thanks again for the help. I'm learning alot.&lt;/P&gt;&lt;P&gt;GR&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 22:18:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/can-i-turn-off-survey-programmatically/m-p/1234342#M46193</guid>
      <dc:creator>GregReinecke</dc:creator>
      <dc:date>2022-11-22T22:18:58Z</dc:date>
    </item>
  </channel>
</rss>

