<?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 Arguments Error in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1379386#M54589</link>
    <description>&lt;P&gt;Helpful tip for S123. While the formulas in the XLSX sheet are NOT Excel compatible, Excel will still give you the "helper" features if you add in "=" in front of the formula.&lt;/P&gt;&lt;P&gt;To do this and check your formula:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Write a S123 formula and press enter (i.e., just exit the cell)&lt;/LI&gt;&lt;LI&gt;Click back into the cell, and add "=" to the start&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_0-1707340910633.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94001iA2B282900D98E92A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_0-1707340910633.png" alt="abureaux_0-1707340910633.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;You will now see color-coded brackets. Also, if you use the arrow keys to scroll over brackets, the matching brackets will be highlighted. And finally, you also get to take advantage of Excel's logic guide:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_2-1707341216577.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94004i4576860491E1966F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_2-1707341216577.png" alt="abureaux_2-1707341216577.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;Without going into too many specifics, you can use this mode to check for balanced brackets and proper formula set-up. E.g., You should only see a single "white" bracket at the end of any nested IF statement. If you see more than one, you have unbalanced brackets&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_1-1707341072997.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94003iD8A8563BB90A61AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_1-1707341072997.png" alt="abureaux_1-1707341072997.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Be sure to delete the "=" before saving the XLSX or you will get an error.&lt;/LI&gt;&lt;/OL&gt;</description>
    <pubDate>Wed, 07 Feb 2024 21:27:16 GMT</pubDate>
    <dc:creator>abureaux</dc:creator>
    <dc:date>2024-02-07T21:27:16Z</dc:date>
    <item>
      <title>'if' Statement Arguments Error</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1378944#M54574</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; I have a conditional statement calculation in my survey in that is returning an error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"XPath evaluation: cannot handle function 'if' requires 3 arguments, Only 2 provided."&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see , so I am stumped.&amp;nbsp; Your input is much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(selected(${JenisPelanggaran},'1'),'Alat Tangkap', if(selected(${JenisPelanggaran},'2'),'Biota Dilindungi', if(selected(${JenisPelanggaran},'3'),'Destruktif/ Merusak', if(selected(${JenisPelanggaran},'4'),'Habitat Penting', if(selected(${JenisPelanggaran},'5'),'IUU Fishing', if(selected(${JenisPelanggaran},'6'),'Jasa Lingkungan (TLPJL)', if(selected(${JenisPelanggaran},'7'),'Pengrusakan Terumbu Karang', if(selected(${JenisPelanggaran},'8'),'Pengrusakan Padang Lamun', if(selected(${JenisPelanggaran},'9'),'Pengrusakan Mangrove', if(selected(${JenisPelanggaran},'10'),'SOP Pemanfaatan', if(selected(${JenisPelanggaran},'11'),'Zonasi')))))))))))&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 03:16:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1378944#M54574</guid>
      <dc:creator>HanggarPrasetio1</dc:creator>
      <dc:date>2024-02-07T03:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: 'if' Statement Arguments Error</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1379024#M54575</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/189184"&gt;@HanggarPrasetio1&lt;/a&gt;&amp;nbsp; , is your last expression missing a value for when the condition is False ?&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;PRE&gt;if(selected(${JenisPelanggaran},'11'),'Zonasi','None of the above'&lt;/PRE&gt;&lt;P&gt;This post has an example&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/td-p/1039576" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-questions/survey123-calculation-multiple-if-parameters/td-p/1039576&lt;/A&gt;&lt;/P&gt;&lt;P&gt;if(condition, value if true,&lt;BR /&gt;if(condition, value if true,&lt;BR /&gt;if(condition, value if true,&lt;BR /&gt;if(condition, value if true,&lt;BR /&gt;if(condition, value if true, value if false)))))&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 11:43:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1379024#M54575</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2024-02-07T11:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: 'if' Statement Arguments Error</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1379386#M54589</link>
      <description>&lt;P&gt;Helpful tip for S123. While the formulas in the XLSX sheet are NOT Excel compatible, Excel will still give you the "helper" features if you add in "=" in front of the formula.&lt;/P&gt;&lt;P&gt;To do this and check your formula:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Write a S123 formula and press enter (i.e., just exit the cell)&lt;/LI&gt;&lt;LI&gt;Click back into the cell, and add "=" to the start&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_0-1707340910633.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94001iA2B282900D98E92A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_0-1707340910633.png" alt="abureaux_0-1707340910633.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;You will now see color-coded brackets. Also, if you use the arrow keys to scroll over brackets, the matching brackets will be highlighted. And finally, you also get to take advantage of Excel's logic guide:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_2-1707341216577.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94004i4576860491E1966F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_2-1707341216577.png" alt="abureaux_2-1707341216577.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;OL&gt;&lt;LI&gt;Without going into too many specifics, you can use this mode to check for balanced brackets and proper formula set-up. E.g., You should only see a single "white" bracket at the end of any nested IF statement. If you see more than one, you have unbalanced brackets&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_1-1707341072997.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/94003iD8A8563BB90A61AA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_1-1707341072997.png" alt="abureaux_1-1707341072997.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Be sure to delete the "=" before saving the XLSX or you will get an error.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 07 Feb 2024 21:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-arguments-error/m-p/1379386#M54589</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-02-07T21:27:16Z</dc:date>
    </item>
  </channel>
</rss>

