<?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 Report Template If Statement with select_one question in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1023827#M32308</link>
    <description>&lt;P&gt;Many thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354006"&gt;@Jim-Moore&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2021 10:42:35 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-02-05T10:42:35Z</dc:date>
    <item>
      <title>Survey123 Report Template If Statement with select_one question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1018695#M32036</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to use an IF statement to display different chunks of text based on the answers to a question.&lt;/P&gt;&lt;P&gt;I have a select_one question which is in a table-list group:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenBlowers_0-1611242436794.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4240i4D970511AC9CF384/image-size/large?v=v2&amp;amp;px=999" role="button" title="BenBlowers_0-1611242436794.png" alt="BenBlowers_0-1611242436794.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here are the "choices":&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BenBlowers_1-1611242488363.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4241i5A2CB6A39A068619/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BenBlowers_1-1611242488363.png" alt="BenBlowers_1-1611242488363.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And here is the if statement I am writing in my Report Template, but it returns no data or text whatsoever:&lt;/P&gt;&lt;P&gt;${if Unknown==”Emergence”}${no_of_bats}x Unknown bat (${frequency}kHZ) emerged at ${recording_time} (track number ${track_number})${/}&lt;/P&gt;&lt;P&gt;${if Unknown==”Return”}${no_of_bats}x Unknown bat (${frequency}kHZ) returned at ${recording_time} (track number ${track_number})${/}&lt;/P&gt;&lt;P&gt;${if Common_pipistrelle==”Emergence”}${no_of_bats}x Common pipistrelle bat(${frequency}kHZ) emerged at ${recording_time} (track number ${track_number})${/}&lt;/P&gt;&lt;P&gt;${if Common_pipistrelle==”Return”}${no_of_bats}x Common pipistrelle bat(${frequency}kHZ) returned at ${recording_time} (track number ${track_number})${/}&lt;/P&gt;&lt;P&gt;Does anyone know why my if statement is wrong?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 15:27:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1018695#M32036</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-01-21T15:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Report Template If Statement with select_one question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1018905#M32056</link>
      <description>&lt;P&gt;Need more information.&amp;nbsp; The If statement is not formatted correctly but I do not have enough information to understand the intent.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The format of the If statement should be If(selected(${fieldName},"select_one value"), what happens if true, what happens if false")&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 22:12:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1018905#M32056</guid>
      <dc:creator>LeonardBarnhill</dc:creator>
      <dc:date>2021-01-21T22:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Report Template If Statement with select_one question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1018959#M32057</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous User&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your syntax is almost there, however, for these expressions in a report template, you need to use the choice and question &lt;EM&gt;names&lt;/EM&gt; (not their labels). For select_one questions you can also use the following 'selected:' syntax:&lt;/P&gt;&lt;P&gt;${if Unknown | selected:"emergence"}Your conditional text goes here.${/}&lt;/P&gt;&lt;P&gt;This is equivalent to:&lt;/P&gt;&lt;P&gt;${if Unknown == "emergence"}Your conditional text goes here.${/}&lt;/P&gt;&lt;P&gt;To check if a choice is not selected, you can use:&lt;/P&gt;&lt;P&gt;${if Unknown != "emergence"}Your conditional text goes here.${/}&lt;/P&gt;&lt;P&gt;If you haven't already seen it, there's a really useful quick reference that provides syntax examples for all the questions in your survey (see link on the Manage Templates dialog):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Report_quick_ref.png" style="width: 652px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/4313i1DDC1E09866478DF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Report_quick_ref.png" alt="Report_quick_ref.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;More on conditional elements can be found &lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm#ESRI_SECTION1_A789EA089E14456995E9910119300AD5" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this is useful&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 23:57:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1018959#M32057</guid>
      <dc:creator>Jim-Moore</dc:creator>
      <dc:date>2021-01-21T23:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Report Template If Statement with select_one question</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1023827#M32308</link>
      <description>&lt;P&gt;Many thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354006"&gt;@Jim-Moore&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 10:42:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-report-template-if-statement-with-select/m-p/1023827#M32308</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-05T10:42:35Z</dc:date>
    </item>
  </channel>
</rss>

