<?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: Two Concat expressions? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1322709#M51405</link>
    <description>&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;if(selected(${CommName},'Other') and &lt;FONT color="#FF0000"&gt;selected(&lt;/FONT&gt;${ZipCode}, '99999'&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;, concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', ${OtherComm}, ' ', ${StateName}, ' ', ${OtherZip})&lt;FONT color="#FF0000"&gt;,''&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;if(&lt;FONT color="#FF0000"&gt;not(&lt;/FONT&gt;selected(${CommName}, 'Other')&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; and &lt;FONT color="#FF0000"&gt;not(selected(&lt;/FONT&gt;${ZipCode}, '99999'&lt;FONT color="#FF0000"&gt;))&lt;/FONT&gt;, concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', ${CommName}, ' ', ${StateName}, ' ', ${ZipCode})&lt;FONT color="#FF0000"&gt;,''&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: Probably worth mentioning, but you may also wish to try this...&lt;/P&gt;&lt;P&gt;For your Zip Code, it seems like you have two Zip Code fields (OtherZip and ZipCode). I assume only one is conditionally shown at a time. In that case, you could set up a &lt;FONT color="#FF0000"&gt;&lt;EM&gt;Calculate&lt;/EM&gt; &lt;/FONT&gt;with a formula of &lt;FONT color="#FF0000"&gt;&lt;EM&gt;coalesce(${OtherZip},${ZipCode})&lt;/EM&gt;&lt;FONT color="#000000"&gt;. Now you just need one concat(), and you reference this calculate in your concat() rather than OtherZip or ZipCode. Assuming I am interpreting your above logic correctly. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Aug 2023 21:18:22 GMT</pubDate>
    <dc:creator>abureaux</dc:creator>
    <dc:date>2023-08-25T21:18:22Z</dc:date>
    <item>
      <title>Two Concat expressions?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1322702#M51402</link>
      <description>&lt;P&gt;Is it possible to write multiple concat expressions to essentially field calc. &lt;U&gt;&lt;STRONG&gt;one&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;field&lt;/STRONG&gt;&lt;/U&gt;? What I am trying to do here is populate a 'FullAddress' field. I have set this up so the end user can type in another city/zip (in a separate field) by choosing the 'other' option in the pre-populated drop-down menus.&amp;nbsp;The intent here is to capture data that is adjacent to the State boundary.&lt;/P&gt;&lt;P&gt;if(selected(${CommName},'Other') and ${ZipCode}, '99999', concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', ${OtherComm}, ' ', ${StateName}, ' ', ${OtherZip})),&lt;/P&gt;&lt;P&gt;if(selected(${CommName}, '!= Other') and ${ZipCode}, '!= 99999', concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', ${CommName}, ' ', ${StateName}, ' ', ${ZipCode}))&lt;/P&gt;&lt;P&gt;Running each of these expressions works by themselves, but when I combine them (as above), it fails to convert the XLS Form in Survey123 Connect. Any help would be greatly appreciated! Maybe I am attempting something that's not even possible to begin with?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 20:56:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1322702#M51402</guid>
      <dc:creator>ChadC</dc:creator>
      <dc:date>2023-08-25T20:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Two Concat expressions?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1322709#M51405</link>
      <description>&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;if(selected(${CommName},'Other') and &lt;FONT color="#FF0000"&gt;selected(&lt;/FONT&gt;${ZipCode}, '99999'&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt;, concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', ${OtherComm}, ' ', ${StateName}, ' ', ${OtherZip})&lt;FONT color="#FF0000"&gt;,''&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;if(&lt;FONT color="#FF0000"&gt;not(&lt;/FONT&gt;selected(${CommName}, 'Other')&lt;FONT color="#FF0000"&gt;)&lt;/FONT&gt; and &lt;FONT color="#FF0000"&gt;not(selected(&lt;/FONT&gt;${ZipCode}, '99999'&lt;FONT color="#FF0000"&gt;))&lt;/FONT&gt;, concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', ${CommName}, ' ', ${StateName}, ' ', ${ZipCode})&lt;FONT color="#FF0000"&gt;,''&lt;/FONT&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: Probably worth mentioning, but you may also wish to try this...&lt;/P&gt;&lt;P&gt;For your Zip Code, it seems like you have two Zip Code fields (OtherZip and ZipCode). I assume only one is conditionally shown at a time. In that case, you could set up a &lt;FONT color="#FF0000"&gt;&lt;EM&gt;Calculate&lt;/EM&gt; &lt;/FONT&gt;with a formula of &lt;FONT color="#FF0000"&gt;&lt;EM&gt;coalesce(${OtherZip},${ZipCode})&lt;/EM&gt;&lt;FONT color="#000000"&gt;. Now you just need one concat(), and you reference this calculate in your concat() rather than OtherZip or ZipCode. Assuming I am interpreting your above logic correctly. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Aug 2023 21:18:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1322709#M51405</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2023-08-25T21:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Two Concat expressions?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1323134#M51433</link>
      <description>&lt;P&gt;Thanks a million!&amp;nbsp;I was able to get it to work via the following expression:&lt;/P&gt;&lt;P&gt;concat(${Location}, ' ', ${Suite}, ' ', ${Street}, ' ', coalesce(${OtherName},${CommName}), ' ', ${StateName}, ' ', coalesce(${OtherZip},${ZipCode}))&lt;/P&gt;&lt;P&gt;I coded &amp;lt;null&amp;gt; values for the ZipCode and CommName fields for the 'Other' option. The key is the ordering (as you demonstrated); using the coalesce function returns the first non-NULL value. The text the user types in for the Other Zip field must precede the coded &amp;lt;null&amp;gt; value associated with the 'Other' label for the ZipCode and CommName field. It works now. Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Aug 2023 20:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/two-concat-expressions/m-p/1323134#M51433</guid>
      <dc:creator>ChadC</dc:creator>
      <dc:date>2023-08-28T20:29:39Z</dc:date>
    </item>
  </channel>
</rss>

