<?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: If then syntax issues in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800254#M10606</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a few calculations that will work with repeats. It sounds like you'll want to use a max() calculation for each repeat's final score, which should be simple enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out these resources for details and information on max() and similar functions:&lt;/P&gt;&lt;P&gt;&lt;A href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformrepeats.htm#ESRI_SECTION1_045B883052D844E89F8EEFF8C2EA638A"&gt;Repeats: Aggregate Functions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/groups/survey123/blog/2017/06/02/world-milk-day-release-21"&gt;Release notes for version 2.1&lt;/A&gt; (scroll to Repeated Aggregate Functions for a better description and a simple example table)&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm"&gt;Formulas&lt;/A&gt; (according to the examples here, min() and max() can be used on either a single field from a repeat, or for multiple different fields, in case that sounds like something you may need)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Jul 2018 16:32:44 GMT</pubDate>
    <dc:creator>NickDierks1</dc:creator>
    <dc:date>2018-07-02T16:32:44Z</dc:date>
    <item>
      <title>If then syntax issues</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800249#M10601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get this calculation to work in survey123 xls, and I think my syntax is incorrect. Can someone help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(${CrossingSpanId},'Spans Full Channel &amp;amp; Banks',1,if(${CrossingSpanId},'Spans Only Bankfull/Active Channel',0.9,if(${CrossingSpanId},'moderate',0.5,if(${CrossingSpanId},'severe',0,if(${CrossingSpanId},'Unknown',1,'NULL')))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error:&amp;nbsp; Xpath Evaluation cannot handle funciton 'if' requires 3 arguments, only 4 povided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 14:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800249#M10601</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-06-25T14:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: If then syntax issues</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800250#M10602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is ${CrossingSpanID} a select_one question? If so, then try using &lt;STRONG&gt;selected()&lt;/STRONG&gt; in your if() statements:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${CrossingSpanId}, 'Spans Full Channel &amp;amp; Banks'), 1, if(selected(${CrossingSpanId}, 'Spans Only Bankfull/Active Channel'), 0.9, if(selected(${CrossingSpanId}, 'moderate'), 0.5, if(selected(${CrossingSpanId}, 'severe'), 0, if(selected(${CrossingSpanId},'Unknown'), 1, 'NULL')))))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 17:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800250#M10602</guid>
      <dc:creator>NickDierks1</dc:creator>
      <dc:date>2018-06-25T17:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: If then syntax issues</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800251#M10603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! This worked! Is it different for a select_multiple?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2018 15:54:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800251#M10603</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-07-02T15:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: If then syntax issues</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800252#M10604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It depends on how you want it to work. This nested if/then statement will simply go in order, and stop when it reaches a true argument or the final else clause ('NULL'), so it will only ever return a single result. For example, if you select both 'Spans Full Channel &amp;amp; Banks' and 'moderate', then this statement will only return the value 1, because that's what comes first, and no else clause is checked for after that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's the behavior you want, then this will work just fine. Otherwise, you'll need one or more complex calculations depending on what you want it do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2018 16:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800252#M10604</guid>
      <dc:creator>NickDierks1</dc:creator>
      <dc:date>2018-07-02T16:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: If then syntax issues</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800253#M10605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you. Do you know if it is possible to make calculations from fields in the related tables/repeats and write back to the original survey/fc? ie i have 5 identical repeats that each have a&amp;nbsp; final score calculated within them, and I want to write back to the fc/survey the max of those scores from the repeats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2018 16:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800253#M10605</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-07-02T16:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: If then syntax issues</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800254#M10606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a few calculations that will work with repeats. It sounds like you'll want to use a max() calculation for each repeat's final score, which should be simple enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check out these resources for details and information on max() and similar functions:&lt;/P&gt;&lt;P&gt;&lt;A href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformrepeats.htm#ESRI_SECTION1_045B883052D844E89F8EEFF8C2EA638A"&gt;Repeats: Aggregate Functions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/groups/survey123/blog/2017/06/02/world-milk-day-release-21"&gt;Release notes for version 2.1&lt;/A&gt; (scroll to Repeated Aggregate Functions for a better description and a simple example table)&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm"&gt;Formulas&lt;/A&gt; (according to the examples here, min() and max() can be used on either a single field from a repeat, or for multiple different fields, in case that sounds like something you may need)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jul 2018 16:32:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-then-syntax-issues/m-p/800254#M10606</guid>
      <dc:creator>NickDierks1</dc:creator>
      <dc:date>2018-07-02T16:32:44Z</dc:date>
    </item>
  </channel>
</rss>

