<?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 on text question in Feature Report Survey123 in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1143617#M40516</link>
    <description>&lt;P&gt;Doug,&lt;/P&gt;&lt;P&gt;Is it possible to do an if statement like the one you listed above (string-length(${fieldname})&amp;gt;0), if true, check a box, and if false, do not check the box?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 14 Feb 2022 14:51:36 GMT</pubDate>
    <dc:creator>SSMGroup</dc:creator>
    <dc:date>2022-02-14T14:51:36Z</dc:date>
    <item>
      <title>If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/806494#M12197</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been struggling with If statements in feature reports.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to make a statement based on whether a text question is answered? I tried among other thing this expression, but it doesn't work:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;${if (OPLP1_oms string-length&amp;gt;0)}&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 12.0pt; "&gt;${/}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;In which 'OPLP1_oms' is the text question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Please advise.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2020 14:46:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/806494#M12197</guid>
      <dc:creator>PeterGoedbloed</dc:creator>
      <dc:date>2020-09-18T14:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/806495#M12198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;if(string-length(${OPLP1_oms}) &amp;gt;0, if true goes here, if false goes here)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;In general it is&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;if(statement, true, false)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;${feild name}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;functions are function(field)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Hope that helps.&amp;nbsp; Looking at the sample in the help will be a good place to get started.&amp;nbsp; &amp;nbsp; Big note is that feature reports may act a bit different.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2020 15:03:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/806495#M12198</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2020-09-18T15:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/806496#M12199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that's usually the setup, but for if statements in Report templates it seems to work slightly different:&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm#ESRI_SECTION1_A789EA089E14456995E9910119300AD5" title="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm#ESRI_SECTION1_A789EA089E14456995E9910119300AD5"&gt;Feature report templates—ArcGIS Survey123 | Documentation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Under the header 'conditional elements' they use the following example expressions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL style="color: #4c4c4c; background-color: #ffffff; font-size: 0.9375rem; margin-left: 0.775rem; margin-bottom: 1.55rem; padding: 0px;"&gt;&lt;LI style="margin: 0.3875rem 0px 0.3875rem 1.5rem;"&gt;&lt;SPAN class=""&gt;${if photo1}&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;displays the section only if the photo1 question has been answered.&lt;/LI&gt;&lt;LI style="margin: 0.3875rem 0px 0.3875rem 1.5rem;"&gt;&lt;SPAN class=""&gt;${if integer1&amp;gt;0}&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;displays the section only if the answer to the integer1 question is a positive number.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You then close the expression with&amp;nbsp;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;${/}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2020 06:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/806496#M12199</guid>
      <dc:creator>PeterGoedbloed</dc:creator>
      <dc:date>2020-09-21T06:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1143617#M40516</link>
      <description>&lt;P&gt;Doug,&lt;/P&gt;&lt;P&gt;Is it possible to do an if statement like the one you listed above (string-length(${fieldname})&amp;gt;0), if true, check a box, and if false, do not check the box?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:51:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1143617#M40516</guid>
      <dc:creator>SSMGroup</dc:creator>
      <dc:date>2022-02-14T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1335888#M52168</link>
      <description>&lt;P&gt;Hey there,&lt;/P&gt;&lt;P&gt;I realize this thread is three years old, but I was coming across the same issue and couldn't find a reliable answer.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scenario&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In a feature report, there is a text question. I want to return the inputs if the text question was answered, otherwise I want to add a custom message if no answer was provided.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Solution&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We need to use the not equal (!) operator before the field name in a if statement.&lt;/P&gt;&lt;P&gt;Following that is the syntax for how you want to display the text if the question is answered.&lt;/P&gt;&lt;P&gt;E.g.,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;${if !(note_question)}No notes were added for this question.${/}
${note_question| appearance:"multiline"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the text question &lt;EM&gt;&lt;STRONG&gt;is unanswered&lt;/STRONG&gt;&lt;/EM&gt;, the not equal if statement is true and the custom note is displayed. Though the note question is called, because it's blank, nothing will appear.&lt;/P&gt;&lt;P&gt;If the text question &lt;EM&gt;&lt;STRONG&gt;is answered&lt;/STRONG&gt;&lt;/EM&gt;, the not equal if statement is false, the custom note is not displayed, and the value submitted for the note question will display.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Text question is unanswered; custom message appears&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vinzafy_3-1696616613870.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/82527iE094641CF4ECD496/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vinzafy_3-1696616613870.png" alt="Vinzafy_3-1696616613870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Text question is answered; inputted value appears&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vinzafy_1-1696616553394.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/82525i4728C1610935EFED/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vinzafy_1-1696616553394.png" alt="Vinzafy_1-1696616553394.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 18:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1335888#M52168</guid>
      <dc:creator>Vinzafy</dc:creator>
      <dc:date>2023-10-06T18:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1374228#M54283</link>
      <description>&lt;P&gt;This helped me out, thanks for sharing&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/171700"&gt;@Vinzafy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 00:55:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1374228#M54283</guid>
      <dc:creator>DerrickFreseADF</dc:creator>
      <dc:date>2024-01-25T00:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: If statement on text question in Feature Report Survey123</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1380602#M54672</link>
      <description>&lt;P&gt;Awesome! Glad it helped &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 20:48:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/if-statement-on-text-question-in-feature-report/m-p/1380602#M54672</guid>
      <dc:creator>Vinzafy</dc:creator>
      <dc:date>2024-02-09T20:48:39Z</dc:date>
    </item>
  </channel>
</rss>

