<?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 statement calculation, Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807506#M12454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a&amp;nbsp;survey for collecting water data, and want to symbolize the map based off of collected values. I figured using a calculation field in the survey would be a good work around, as I could just based the symbology off that field. Basically I need to know if the water is "Oligotrophic", "Mesotrophic", or "Eutrophic" based on the following values:&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440925_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody provide any suggestions. I'm pretty new to Survey123,&amp;nbsp;and the calculation I am trying to use is long and likely erroneous:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(${P}&amp;lt;15,and ${TN}&amp;lt;400,and${ChloroA}&amp;lt;3),"Oligotrophic"), if(${P}&amp;gt;15 and &amp;lt;=25, and${TN}&amp;gt;400 and &amp;lt;=600,and${ChloroA}&amp;gt;3 and &amp;lt;=600),"Mesotrophic"), if(${P}&amp;gt;25,and ${TN}&amp;gt;=600,and${ChloroA}&amp;gt;=7),"Eutrophic")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Apr 2019 20:54:17 GMT</pubDate>
    <dc:creator>MichaelFazio2</dc:creator>
    <dc:date>2019-04-01T20:54:17Z</dc:date>
    <item>
      <title>If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807497#M12445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on creating form with multiple repeats/questions.&amp;nbsp; What I am trying to do is calculate an answer to a question based on the which answer was chosen from the previous select_one question.&amp;nbsp; I will use sample data for simplicity sake.&amp;nbsp; &lt;/P&gt;&lt;P&gt;select_one color: green, blue, red, yellow&lt;/P&gt;&lt;P&gt;calculation results based on color chosen&amp;nbsp;(what I am trying): if(selected(${color}, 'red', 'Cardinal', if(selected(${color}, 'green', 'Parrot', if(selected(${color}, 'blue', 'Bluebird', if(selected(${color}, 'yellow', 'Finich', 'N/A'))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have received multiple different errors for trying this multiple ways, the current error is "requires 3 arguments, only provided 1"...Sometimes I get "requires 3 arguments, only provided 4 or 5 etc"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing incorrectly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 18:57:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807497#M12445</guid>
      <dc:creator>KatieWise</dc:creator>
      <dc:date>2018-03-05T18:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807498#M12446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out, took the "selected" out and eventually got everything correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2018 20:34:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807498#M12446</guid>
      <dc:creator>KatieWise</dc:creator>
      <dc:date>2018-03-05T20:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807499#M12447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mary,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad you got it working. The reason your calculation was not working is that you are missing closing brackets on your selected statement. It should be similar to: selected(${question},'answer').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore using a selected statement in an if statement: if(&lt;SPAN&gt;selected(${question},'answer'),'true','false')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And you can then nest the if statements as you have done in your original calculation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can find some good info in this blog:&amp;nbsp;&lt;A href="https://community.esri.com/groups/survey123/blog/2016/05/28/the-art-of-hiding"&gt;https://community.esri.com/groups/survey123/blog/2016/05/28/the-art-of-hiding&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Phil.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 04:30:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807499#M12447</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-03-07T04:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807500#M12448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, I believe I'm attempting to do the same thing however I'm fighting the syntax and was hoping for assistance.&lt;/P&gt;&lt;P&gt;Essentially a pre selected culvert type determines the expression used to calculate a value. So it I select culvert type A do this math, if I select culvert&amp;nbsp;type B do different math ect with culvert types C,D,E,F&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I have (if culvert type CSP is selected the math is just the IS rating * 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if((selected(${CulvertType},'C.S.P'),int(${InvertSedimentRating}*2),0))&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm struggling to get more values in for the selected (the below line&amp;nbsp;&lt;EM&gt;doesn't work can't figure out why)&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${CulvertType},'C.S.P'),int(${InvertSedimentRating}*2),0),&lt;SPAN&gt;if(selected(${CulvertType},'H.D.P.E'),int(${InvertSedimentRating}*3.2),0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any advice?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 14:26:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807500#M12448</guid>
      <dc:creator>ShawnRoberts1</dc:creator>
      <dc:date>2018-07-05T14:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807501#M12449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way the statement is written, your first else case is 0, when it needs to be the next if() statement. Basically, it reads as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if&lt;/STRONG&gt; culvert type is CSP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;then&lt;/STRONG&gt; int(${InvertSedimentRating}*2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else &lt;/STRONG&gt;0&lt;/P&gt;&lt;P&gt;----- the function stops here, because that is a full statement. Anything else after this in the same calculation either isn't evaluated or just plain breaks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to nest your if() statements, the next if() needs to take the place of the preceding if()'s else case. Simply remove the "0)," from the first if() in your calculation, and close up the parentheses at the end:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${CulvertType},'C.S.P'),int(${InvertSedimentRating}*2),&lt;SPAN&gt;if(selected(${CulvertType},'H.D.P.E'),int(${InvertSedimentRating}*3.2),0))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if&lt;/STRONG&gt; culvert type is CSP&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;then&lt;/STRONG&gt; int(${InvertSedimentRating}*2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else if&lt;/STRONG&gt; culvert type is HDPE&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;then&lt;/STRONG&gt; &lt;SPAN&gt;int(${InvertSedimentRating}*3.2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;else&lt;/STRONG&gt; 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 15:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807501#M12449</guid>
      <dc:creator>NickDierks1</dc:creator>
      <dc:date>2018-07-05T15:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807502#M12450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect thanks Nick!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2018 15:41:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807502#M12450</guid>
      <dc:creator>ShawnRoberts1</dc:creator>
      <dc:date>2018-07-05T15:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807503#M12451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I included an integer type question for getting the number of truck axles (truck_axles: from 2 to 8), and a decimal type question for getting the truck load percentage(load_pct). Each truck axle value has a theoretical load capacity (theo_load_weight). In my calculation to get the effective weight (load_weight), I must match the theoretical load capacity, from the axles number, and then multiply by the load percentage&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if I should use an IF&lt;/P&gt;&lt;P&gt;if(selected(${truck_axles},'2'),...?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 20:14:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807503#M12451</guid>
      <dc:creator>ReneAubut</dc:creator>
      <dc:date>2018-07-26T20:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807504#M12452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An if() statement sequence may work for what you are doing. An alternative would be to have the theo_load_weight data in a CSV and use pulldata() to look up the value based on the number of axles. &amp;nbsp;See&amp;nbsp;&lt;A class="link-titled" href="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_A3C2F3566F974734B55ECECD31C6CA91" title="http://doc.arcgis.com/en/survey123/desktop/create-surveys/xlsformformulas.htm#ESRI_SECTION1_A3C2F3566F974734B55ECECD31C6CA91"&gt;Formulas—Survey123 for ArcGIS | ArcGIS&lt;/A&gt;&amp;nbsp;for more information on pulldata().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 23:10:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807504#M12452</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2018-08-01T23:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807505#M12453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have 4 types of truck monitoring (Type_Suivi): ImportationREM, Reutilisation, Elimination and Entreposage. For question WBS_Origine, i set a relevant condition where truck monitoring is ImportationREM, but then for that same question, i use this statement in the calculation cell.:&lt;/P&gt;&lt;P&gt;if (selected(${Type_Suivi},'Elimination'),${WBS_id},if(selected(${Type_Suivi},'Reutilisation'),${WBS_id},if (selected(${Type_Suivi},'Entreposage'),${WBS_id},’0’)))&lt;/P&gt;&lt;P&gt;Doing so, all questions after that one are omitted. Is the relevant condition blocking the calculation and everthing else that follows?&lt;/P&gt;&lt;P&gt;WBS_id is a text variable for storing coded areas of the project site that am attempting to write to the WBS_Origine&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Mar 2019 19:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807505#M12453</guid>
      <dc:creator>ReneAubut</dc:creator>
      <dc:date>2019-03-08T19:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807506#M12454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I have a&amp;nbsp;survey for collecting water data, and want to symbolize the map based off of collected values. I figured using a calculation field in the survey would be a good work around, as I could just based the symbology off that field. Basically I need to know if the water is "Oligotrophic", "Mesotrophic", or "Eutrophic" based on the following values:&amp;nbsp;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440925_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anybody provide any suggestions. I'm pretty new to Survey123,&amp;nbsp;and the calculation I am trying to use is long and likely erroneous:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(${P}&amp;lt;15,and ${TN}&amp;lt;400,and${ChloroA}&amp;lt;3),"Oligotrophic"), if(${P}&amp;gt;15 and &amp;lt;=25, and${TN}&amp;gt;400 and &amp;lt;=600,and${ChloroA}&amp;gt;3 and &amp;lt;=600),"Mesotrophic"), if(${P}&amp;gt;25,and ${TN}&amp;gt;=600,and${ChloroA}&amp;gt;=7),"Eutrophic")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2019 20:54:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807506#M12454</guid>
      <dc:creator>MichaelFazio2</dc:creator>
      <dc:date>2019-04-01T20:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807507#M12455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to check, how does the evaluation work when 2 of the variables would report one classification but one variable reports another? &amp;nbsp;For example, TP = 18, TN = 380, CholoroA = 3.1(1 Oligotrophic and 2 Mesotrophic)?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the most part, you calculation looks close to what your graph looks like; you shouldn't have commas in the evaluator section (for example, the first if should be&amp;nbsp;&lt;EM style="background-color: #ffffff; "&gt;${P}&amp;lt;15 and ${TN}&amp;lt;400 and${ChloroA}&amp;lt;3 &lt;/EM&gt;&lt;SPAN style="background-color: #ffffff;"&gt;and I think your right-side parenthesis aren't lined up correctly - there should be 3 of them, one to close off each if() statement.&lt;/SPAN&gt;&lt;EM style="background-color: #ffffff; "&gt;&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2019 20:58:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807507#M12455</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2019-04-02T20:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807508#M12456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, James. To be honest, I hadn't considered the values being in two different categories at once. I'll have to ask the user. As far as the statement, I'm trying a nested if statement now, but just having trouble with my brackets and/or parenthesis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2019 13:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807508#M12456</guid>
      <dc:creator>MichaelFazio2</dc:creator>
      <dc:date>2019-04-03T13:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807509#M12457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey folks!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;According to this topic I have a problem with setting condition to auto-fill next question:&lt;BR /&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/452548_pastedImage_1.png" /&gt;&lt;BR /&gt;In select-one question named 'Assignee' I have few choices like 'James', 'Jessica', 'Adam'... and I want to set condition for next question named 'Assignee_Mail' to show me i.e. if 'Assignee' is James, 'Assignee_Mail' should be filled as 'james.smith@mail.com. This is very important for me because I want to use the question 'Assignee_Mail' field to set in Integromat as a dynamic value for e-mail recipient.&lt;/P&gt;&lt;P&gt;I tried few options for example...&lt;BR /&gt;&lt;STRONG style="font-size: 11.0pt; "&gt;if(selected(${Assignee}, 'James') or selected(${Assignee}, 'Jessica') or selected(${Assignee}, 'Adam'), ''jim@mail.com', ''jess@mail.com','adm@mail.com'))) &lt;/STRONG&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;but it doesn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;Could you help me please ?&lt;BR /&gt;Thank you in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt;"&gt;G&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2019 14:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807509#M12457</guid>
      <dc:creator>GrzegorzIgnatowicz</dc:creator>
      <dc:date>2019-07-09T14:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807510#M12458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Grzegorz,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes it is possible to do what you want, but you need to use nested if statements, not one if statement with or expressions. It should look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${Assignee}, 'James'), 'jim@mail.com', if(selected(${Assignee}, 'Jessica'), 'jess@mail.com', if(selected(${Assignee}, 'Adam'), 'adm@mail.com', '')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that doesn't work, can you send a copy of your xslx file, and I can take a closer look and let you know the best way to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 00:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807510#M12458</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-07-11T00:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807511#M12459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/193980"&gt;Philip Wilson&lt;/A&gt;‌ I can't find words to thank you! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt; I've been struggling with this query for few days. It works now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 09:11:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807511#M12459</guid>
      <dc:creator>GrzegorzIgnatowicz</dc:creator>
      <dc:date>2019-07-11T09:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807512#M12460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found this thread useful so far but there is a hang-up somewhere (calculation, type etc) that is not allowing my calculation to go through...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Context: I'd like to collect water temperature data in both Fahrenheit or Celsius but I would like the form to convert any Fahrenheit calculations to Celsius so I can have one column (hidden on the survey) on my output .csv spreadsheet. Currently, I have a decimal 'temp' variable, a select_one 'unit' variable with 'fahrenheit' and 'celsius' and now im hoping for a hidden integer field to calculate celsius based on the select_one 'unit' and decimal 'temp' fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE width="606"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;" width="202"&gt;decimal&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="170"&gt;temp&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="234"&gt;Water Temperature&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;select_one unit&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;unit&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="234"&gt;Temperature Unit&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59;"&gt;decimal&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;"&gt;temp_c&lt;/TD&gt;&lt;TD style="font-size: 10.0pt; color: black; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none;" width="234"&gt;Celsius&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current calculation "works"t and updates with my survey123 connect preview, however I do not get the Celsius field to populate on my preview form (currently leaving the field visible to test systems but eventually want it hidden).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(selected(${unit},'fahrenheit'),int((${temp}-32)*0.55555),if(selected(${unit},'celsius'),int(${temp}*1),'NA'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;if&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;unit&lt;/SPAN&gt;&amp;nbsp;is&amp;nbsp;Fahrenheit&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;then&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;int(${temp}-32*0.55555&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;else if&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;unit&lt;/SPAN&gt;&amp;nbsp;is&amp;nbsp;Celsius&lt;STRONG style="border: 0px; font-weight: bold;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;then&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;int(${temp}*1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;STRONG style="border: 0px; font-weight: bold;"&gt;else&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;NA&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;Does my current calculation reflect that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;If I want a decimal output in my hidden calculation what relevant columns should I be utilizing? bind: type? bind:esriFieldType?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2020 18:08:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807512#M12460</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-03-23T18:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807513#M12461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Clay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a third option, as you have nested the if statement to provide a value of 'NA' if neither Fahrenheit or Celsius is selected? &amp;nbsp;It does reflect what you describe, but doesn't make sense with the rest of your description. &amp;nbsp;If you want decimal output, 'NA' will not be a valid value. &amp;nbsp;You should set bind:Esri:fieldType to a floating point (Single/Double) field field type for decimal storage.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2020 21:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/807513#M12461</guid>
      <dc:creator>JamesTedrick</dc:creator>
      <dc:date>2020-03-24T21:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/1213426#M44867</link>
      <description>&lt;P&gt;Hello!&amp;nbsp; (Surveyt123 Connect | Version 3.14.274)&lt;/P&gt;&lt;P&gt;Thank you in advance for your assistance!!&lt;/P&gt;&lt;P&gt;I have an if/and calculation that creates a default value if 6 questions all have the same answer. However, one of the questions is relevant based on a previous response so it is is hidden on occasion, so it cannot be answered. This makes the if/and calculation void, even if all of the visible questions are have the same answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to solve this with the calculation? Or do I have to rethink the workflow?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Jessica&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 14:55:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/1213426#M44867</guid>
      <dc:creator>JessicaJThompson</dc:creator>
      <dc:date>2022-09-16T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: If statement calculation, Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/1322786#M51410</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I am stuck with kind of a similar problem.&lt;/P&gt;&lt;P&gt;We have an external CSV from where want to verify the entered code. If the entered code is correct then show the rest of the questions and if the value entered in code is correct we want to provide suggestion saying that entered code is incorrect but the survey doesn't seem to try and meet the condition. We have the following if&amp;nbsp; statement&lt;/P&gt;&lt;P&gt;We pull the code value from CSV in a field name (code) as hidden and use the following calculation&lt;/P&gt;&lt;TABLE width="369"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="369"&gt;if(selected('${code}'='${enter_security_code}','${code_check}') and selected(${code}!='${enter_security_code}'),'${check_the_code}','${code_check}')&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But this seems to error out a below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArchitSrivastava_0-1693123220340.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/79224iC119E73AA7E99CD1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArchitSrivastava_0-1693123220340.png" alt="ArchitSrivastava_0-1693123220340.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It would be great if I can get any suggestions as to why this is not working. Any help would be highly appreciated.&lt;/P&gt;&lt;P&gt;-Archit&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2023 08:00:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-calculation-survey123/m-p/1322786#M51410</guid>
      <dc:creator>ArchitSrivastava</dc:creator>
      <dc:date>2023-08-27T08:00:35Z</dc:date>
    </item>
  </channel>
</rss>

