<?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 Return results with CONTAINS function? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857187#M25014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologies, I have made a few changes to my local form. Please use the name (VegetationPlantNames) in the posted form, not (TreeStrarumPlantNames).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Jun 2020 20:13:36 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-06-08T20:13:36Z</dc:date>
    <item>
      <title>Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857181#M25008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a survey and I want to find a value in a string that is after the "="&amp;nbsp; sign. Where if the value they select contains FAC, FACW or OBL after the equal sign - then answer YES to a dominant species of vegetation.&amp;nbsp; If it is a no, then No is automatically selected in dominant species.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just not sure how to format this formula in the survey:&lt;/P&gt;&lt;P&gt;if(selected(${VegetationPlantNames} contains 'FAC", or 'FACW' or 'OBL') after "=" THEN TreeStratumDominantSpeciesYN = 'YES'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached survey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jun 2020 21:57:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857181#M25008</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-03T21:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857182#M25009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand the CONTAINS returns a true or false. Is there another way to search within a string in Survey123?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 14:00:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857182#M25009</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-08T14:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857183#M25010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Having the HTML in there does make it harder.&amp;nbsp; You syntax is wrong but you may just be showing an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your sheet what you want to check is always at the end.&amp;nbsp; So how about something like this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;conatins(substr(question, string-length(question)-4,&amp;nbsp;&lt;SPAN&gt;string-length(question)), "FACW")&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;then add the rest on the same way with with an "or" in between (note you could do -3 for the rest but -4 should also work).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 15:07:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857183#M25010</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2020-06-08T15:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857184#M25011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Doug,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following as the expression (for testing):&lt;/P&gt;&lt;TABLE height="54" width="989"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 11pt; color: #006100; font-weight: 400; text-decoration: none; border-color: #9bbb59 currentcolor currentcolor; border-style: solid none none; border-width: 0.5pt medium medium; background: #c6efce none repeat scroll 0% 0%; width: 981.667px;"&gt;selected(${VegetationToReportYN},'Yes') and contains(substr(TreeStratumPlantNames, string-length(TreeStratumPlantNames)-3,&amp;nbsp;string-length(TreeStratumPlantNames)), "ACW")&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it is searching the entire external_choices section and always comes back passing the criteria. That above statement is in this line:&lt;/P&gt;&lt;TABLE width="955"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="font-size: 11.0pt; color: #006100; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: .5pt solid #9BBB59; background: #C6EFCE;" width="249"&gt;select_one yes_no&lt;/TD&gt;&lt;TD style="font-size: 11.0pt; color: #006100; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #C6EFCE;" width="283"&gt;TreeStratumDominantSpeciesYN&lt;/TD&gt;&lt;TD style="font-size: 11.0pt; color: #006100; font-weight: 400; text-decoration: none; border-top: .5pt solid #9BBB59; border-right: none; border-bottom: none; border-left: none; background: #C6EFCE;" width="423"&gt;&amp;lt;center&amp;gt;&amp;lt;font size="1"&amp;gt;Dominant Species:&amp;lt;/font&amp;gt;&amp;lt;/center&amp;gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;under relevant.&amp;nbsp; Is this how it should work, because I only want TreeStratumDominantSpeciesYN to be YES if this condition is valid for the selected tree Otherwise, it will be "No". Do you additional thoughts on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 19:54:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857184#M25011</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-08T19:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857185#M25012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not seeing the field&amp;nbsp;TreeStratumPlantNames.&amp;nbsp;&amp;nbsp;Should it be VegetationPlantNames?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works&lt;/P&gt;&lt;P&gt;selected(${VegetationToReportYN},'Yes') and contains(substr(${VegetationPlantNames}, string-length(${VegetationPlantNames})-3, string-length(${VegetationPlantNames})), "ACW")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:08:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857185#M25012</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2020-06-08T20:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857186#M25013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh and you are missing the field syntax ${}.&amp;nbsp; Not sure if you just were giving an example or you missed that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:12:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857186#M25013</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2020-06-08T20:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857187#M25014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologies, I have made a few changes to my local form. Please use the name (VegetationPlantNames) in the posted form, not (TreeStrarumPlantNames).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:13:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857187#M25014</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-08T20:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857188#M25015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See above this works for me&lt;/P&gt;&lt;P&gt;selected(${VegetationToReportYN},'Yes') and contains(substr(${VegetationPlantNames}, string-length(${VegetationPlantNames})-3, string-length(${VegetationPlantNames})), "ACW")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:14:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857188#M25015</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2020-06-08T20:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857189#M25016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, that worked!&lt;/P&gt;&lt;P&gt;Have a great day and thanks again for the guidance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:19:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857189#M25016</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-08T20:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857190#M25017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great.&amp;nbsp; Note I would not put that HTML code in the name field.&amp;nbsp; It will be in your data forever and that will be a nightmare.&amp;nbsp; I you really want the colors put them in the label column only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also see commas in your lists.&amp;nbsp; Cannot do that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857190#M25017</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2020-06-08T20:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: Survey123 Return results with CONTAINS function?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857191#M25018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I removed all the HTML code in the names &amp;amp; working on the comma's.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Jun 2020 20:44:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/survey123-return-results-with-contains-function/m-p/857191#M25018</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-08T20:44:29Z</dc:date>
    </item>
  </channel>
</rss>

