<?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: Error Initializing Form in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/error-initializing-form/m-p/801890#M10990</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicole&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your IF statement and the last line of the error message, it looks like the false argument is missing from the final nested IF statement (i.e. the value to return if &lt;EM&gt;all&lt;/EM&gt; arguments are false). IF statements require three arguments: if(condition, value if true, value if false).&amp;nbsp;So your calculation could look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(${CurrentCapacity}&amp;gt;${Capacity_Total}, 'Over Capacity', if(${CurrentCapacity}=${Capacity_Total}, 'At Capacity', if(${CurrentCapacity}&amp;lt;${Capacity_Total}, 'Under Capacity','No capacity entered')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to return null instead, use &lt;STRONG&gt;''&lt;/STRONG&gt; in place of 'No capacity entered'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2020 01:34:12 GMT</pubDate>
    <dc:creator>Jim-Moore</dc:creator>
    <dc:date>2020-04-21T01:34:12Z</dc:date>
    <item>
      <title>Error Initializing Form</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-initializing-form/m-p/801889#M10989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;When I try access the survey url&amp;nbsp;in a web application I get an error.&amp;nbsp;&amp;nbsp;The survey uses data from an existing feature service; data from this feature service is used in calculations when the form opens.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;The calculations come from a nested if statement which work in S123 Connect, but throw an error when opened in the web app.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;if(${CurrentCapacity}&amp;gt;${Capacity_Total}, 'Over Capacity', if(${CurrentCapacity}=${Capacity_Total}, 'At Capacity', if(${CurrentCapacity}&amp;lt;${Capacity_Total}, 'Under Capacity')))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Here's the error from the dev tools console:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/489002_pastedImage_1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;And the error itself:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/489004_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Any ideas out there on what's going on? It works perfect in S123 Connect:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG src="https://lh3.googleusercontent.com/-Zkx0v4apDO0/XpjbO8JNAZI/AAAAAAAAAes/w5Sq0AJi9WcgYcdVRZUl1nZjDuge_jxtgCK8BGAsYHg/s0/2020-04-16.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;#Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;~Nikki&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;A href="https://community.esri.com/migrated-users/3263"&gt;James Tedrick&lt;/A&gt;‌&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2020 22:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-initializing-form/m-p/801889#M10989</guid>
      <dc:creator>NEidenAZ</dc:creator>
      <dc:date>2020-04-16T22:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error Initializing Form</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/error-initializing-form/m-p/801890#M10990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nicole&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your IF statement and the last line of the error message, it looks like the false argument is missing from the final nested IF statement (i.e. the value to return if &lt;EM&gt;all&lt;/EM&gt; arguments are false). IF statements require three arguments: if(condition, value if true, value if false).&amp;nbsp;So your calculation could look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(${CurrentCapacity}&amp;gt;${Capacity_Total}, 'Over Capacity', if(${CurrentCapacity}=${Capacity_Total}, 'At Capacity', if(${CurrentCapacity}&amp;lt;${Capacity_Total}, 'Under Capacity','No capacity entered')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to return null instead, use &lt;STRONG&gt;''&lt;/STRONG&gt; in place of 'No capacity entered'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2020 01:34:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/error-initializing-form/m-p/801890#M10990</guid>
      <dc:creator>Jim-Moore</dc:creator>
      <dc:date>2020-04-21T01:34:12Z</dc:date>
    </item>
  </channel>
</rss>

