<?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: Concatenating JSON Strings in a pulldata() Request in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123340#M39074</link>
    <description>&lt;P&gt;I would think you need to pull in each field into the form then concat the 123 fields.&amp;nbsp; You can make them hidden and set bind type to null so they are not shown on the form or in the service.&lt;/P&gt;&lt;P&gt;The pulldata call is not going to expect a function in the call itsefl, it is just text at that point.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 14:52:10 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2021-12-07T14:52:10Z</dc:date>
    <item>
      <title>Concatenating JSON Strings in a pulldata() Request</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123338#M39073</link>
      <description>&lt;P&gt;I'm trying to &lt;SPAN&gt;concatenate several attributes out of a JSON string in a pulldata() request. I've written a script to pull in data as a JSON string from another feature layer based on a geopoint. What I need is to combine multiple attributes from that JSON string to create the full mailing address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is my current survey. In the Mailing Address calculation is all of the fields needed for the full mailing address.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SurveyEXCEL.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28982i97CB95BC1A9B02F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="SurveyEXCEL.png" alt="SurveyEXCEL.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Below is an example of the current output.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SurveyADD.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/28981i5134D2C40F3D6BC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SurveyADD.png" alt="SurveyADD.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The desire outcome for mailing address is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PO Box 1129&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;New Bern, NC 28560&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've tried using pulldata("@json",${myjson}, concat("attributes.TMADDR", "attributes.CITYNM", "attributes.TAXSTE", "attributes.ZIP"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;as well as pulldata("@json",${myjson}, concat("attributes.TMADDR" + "attributes.CITYNM" + "attributes.TAXSTE" + "attributes.ZIP"))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anyone have any ideas?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 14:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123338#M39073</guid>
      <dc:creator>Dylan_Wingler</dc:creator>
      <dc:date>2021-12-07T14:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating JSON Strings in a pulldata() Request</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123340#M39074</link>
      <description>&lt;P&gt;I would think you need to pull in each field into the form then concat the 123 fields.&amp;nbsp; You can make them hidden and set bind type to null so they are not shown on the form or in the service.&lt;/P&gt;&lt;P&gt;The pulldata call is not going to expect a function in the call itsefl, it is just text at that point.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 14:52:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123340#M39074</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-12-07T14:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenating JSON Strings in a pulldata() Request</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123988#M39125</link>
      <description>&lt;P&gt;Do you mean that you are struggling to get all of the required address information into a correctly formatted address (as shown) to display to the user in a note field or something? It looks like from your screenshot, that some of your info may be incorrect (e.g., "attributes.PANAME" should be the owner according to your survey but it is returning the value "NEW BERN-CITY OF". Is that correct?). I'm probably missing something!&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the past, I've done similar stuff by just writing another JavaScript function to handle and format that the output. Maybe something like the snippet below and then pass your attributes in another pulldata JS call?&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;function formatAddress(address, city, state, zip){
  return `${address}&amp;lt;br&amp;gt;${city}, ${state} ${zip}`;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 19:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/concatenating-json-strings-in-a-pulldata-request/m-p/1123988#M39125</guid>
      <dc:creator>KimberlyMcCallum</dc:creator>
      <dc:date>2021-12-08T19:39:35Z</dc:date>
    </item>
  </channel>
</rss>

