<?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: Survey123 Calculation - Multiple If Parameters in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039617#M33345</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/221186"&gt;@dgray&lt;/a&gt;&amp;nbsp;it sounds like you want to nest five if() statements in one expression, is that right? That's definitely doable. As demonstrated in &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/survey123-invalid-calculate-for-the-bind-in-if-statement-bad/m-p/1037469/highlight/true#M33239" target="_self"&gt;this reply&lt;/A&gt;, you can nest multiple if() statements, remembering to ensure each if() contains three arguments. The following example tests five conditions:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if(condition, value if true, if(condition, value if true, if(condition, value if true, if(condition, value if true, if(condition, value if true, value if false)))))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;It's often easier to construct each if() statement separately first and check that each one works, before merging them into one expression.&lt;/P&gt;&lt;P&gt;Hope this helps. Best, Jim&lt;/P&gt;</description>
    <pubDate>Tue, 23 Mar 2021 01:43:16 GMT</pubDate>
    <dc:creator>Jim-Moore</dc:creator>
    <dc:date>2021-03-23T01:43:16Z</dc:date>
    <item>
      <title>Survey123 Calculation - Multiple If Parameters</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039576#M33343</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I was wondering how to deal with multiple if conditions in a Survey123 calculation.&amp;nbsp; I know you can embed an if within in if but I'm not sure if this can handle all the if circumstances.&amp;nbsp; Basically, in my case, depending on which region you pick from a Select One list, a different formula will be used to crunch the same value parameter.&amp;nbsp; I have four different formulas, and one of them has two if's within it, so a total of five possible formulas used to crunch the same parameter.&lt;/P&gt;&lt;P&gt;How could I structure this?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 23:35:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039576#M33343</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-03-22T23:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation - Multiple If Parameters</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039617#M33345</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/221186"&gt;@dgray&lt;/a&gt;&amp;nbsp;it sounds like you want to nest five if() statements in one expression, is that right? That's definitely doable. As demonstrated in &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/survey123-invalid-calculate-for-the-bind-in-if-statement-bad/m-p/1037469/highlight/true#M33239" target="_self"&gt;this reply&lt;/A&gt;, you can nest multiple if() statements, remembering to ensure each if() contains three arguments. The following example tests five conditions:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if(condition, value if true, if(condition, value if true, if(condition, value if true, if(condition, value if true, if(condition, value if true, value if false)))))&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;It's often easier to construct each if() statement separately first and check that each one works, before merging them into one expression.&lt;/P&gt;&lt;P&gt;Hope this helps. Best, Jim&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 01:43:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039617#M33345</guid>
      <dc:creator>Jim-Moore</dc:creator>
      <dc:date>2021-03-23T01:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation - Multiple If Parameters</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039799#M33359</link>
      <description>&lt;P&gt;The other way is to have 4 calculate fields that always do all 4 calcs.&amp;nbsp; Then use the if to pick out which one to use.&amp;nbsp; Easier to write.&lt;/P&gt;&lt;P&gt;If say the multiplier changes then I use pulldata for that.&amp;nbsp; I do a lookup to get the value then use that to say multiply.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 15:05:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039799#M33359</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-03-23T15:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation - Multiple If Parameters</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039825#M33361</link>
      <description>&lt;P&gt;Great, both are useful pieces of information.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 16:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1039825#M33361</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-03-23T16:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation - Multiple If Parameters</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1055288#M34402</link>
      <description>&lt;P&gt;How would you deal with dates?&amp;nbsp; If there is a date selected/entered....if there isn't a date selected/entered.&lt;/P&gt;&lt;P&gt;If there is a date entered in field A, I want field B to be "Completed".&amp;nbsp; If there isn't a date entered in field A, I want field B to be "Open"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 16:41:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1055288#M34402</guid>
      <dc:creator>KellyArmstrong</dc:creator>
      <dc:date>2021-05-06T16:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Calculation - Multiple If Parameters</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1055348#M34408</link>
      <description>&lt;P&gt;if(${datefield} = "", "Open", "Completed")&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 18:13:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/m-p/1055348#M34408</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-05-06T18:13:48Z</dc:date>
    </item>
  </channel>
</rss>

