<?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: Auto-populate survey with attributes from more than one layer in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1122640#M39029</link>
    <description>&lt;P&gt;Note it seems like the field list bug is now fixed.&amp;nbsp; That means you can do this and it will be much faster for large layers.&lt;/P&gt;&lt;P&gt;var tbl = Filter(FeatureSetByName($map,"Points", ["DesignLat"], false), sql);&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 19:53:20 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2021-12-03T19:53:20Z</dc:date>
    <item>
      <title>Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034658#M33053</link>
      <description>&lt;P&gt;Is it possible to auto-populate a survey with attributes from more than one layer? I'm thinking of a web app where a user clicks on the map, attributes from multiple layers appear along with a link to a URL configured with parameters of the collected attributes.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 19:56:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034658#M33053</guid>
      <dc:creator>JeffreyMotz</dc:creator>
      <dc:date>2021-03-09T19:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034667#M33054</link>
      <description>&lt;P&gt;Yes a do this.&amp;nbsp; It works in AGOL and now the new Field Maps (not in Collector).&lt;/P&gt;&lt;P&gt;Take a look at FeatureSet functions in Arcade.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is some sample code for you using 1 layer.&amp;nbsp; You can make several arcade expressions and pass all of them over.&amp;nbsp; (note current bug requires all fields to be returned.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var sql = "PointID = '" + $feature.PointID + "'";
var tbl = Filter(FeatureSetByName($map,"Points", ["*"], false), sql);
return First(tbl).DesignLat&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_0-1615320799409.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/7998i50021B6DC01E8B5F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_0-1615320799409.png" alt="DougBrowning_0-1615320799409.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;arcgis-survey123://?itemID=2fb3880b8631451cac08f1653f350787&amp;amp;field:PointID={PointID}&amp;amp;field:EvaluationID={expression/expr0}&amp;amp;field:FieldEvalDate={FieldEvalDate}&amp;amp;field:FieldEvalStatus={FieldEvalStatus}&amp;amp;field:DesignLat={expression/expr6}&amp;amp;field:DesignLong={expression/expr7}&amp;amp;field:AvgTypicalBankfullWidths={expression/expr1}&amp;amp;field:CollectCoreSubset1={expression/expr8}&amp;amp;field:CollectCoreSubset2={expression/expr9}&amp;amp;field:CollectCoreSubset3={expression/expr10}&amp;amp;field:Supplementals={expression/expr11}&amp;amp;field:CollectGreenlineVegComp={expression/expr12}&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 20:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034667#M33054</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-03-09T20:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034668#M33055</link>
      <description>&lt;P&gt;I think the answer to this (and most questions) is "it depends".&lt;/P&gt;&lt;H4&gt;Using built-in web maps / apps&lt;/H4&gt;&lt;P&gt;In order to &lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-encode-url-parameters-in-the-web/ba-p/899129" target="_self"&gt;populate a Survey123 URL&lt;/A&gt; with attributes from a layer, you'd need to create an expression on one of your feature layers. That's pretty straightforward, and examples abound.&lt;/P&gt;&lt;P&gt;To get more than one layer, the limitation here is that the expression that generates a URL needs to come out of a single layer. The other layers would need to be brought into the same expression by means of Arcade's &lt;A href="https://developers.arcgis.com/arcade/function-reference/geometry_functions/" target="_self"&gt;geometry functions&lt;/A&gt;, like &lt;STRONG&gt;Intersects&lt;/STRONG&gt;, etc., in order to grab an attribute from another layer.&lt;/P&gt;&lt;P&gt;This might be okay, but then, I don't know the shapes of your layers. I can easily imagine a situation in which the clicked location does not correspond to the same feature that would be returned from the geometry functions.&lt;/P&gt;&lt;H4&gt;Using Custom JS&lt;/H4&gt;&lt;P&gt;If you built your web map from scratch, you could probably get a clicked coordinate to run a series of intersections with your layers and spit out a single URL. I don't know enough JS to be of much help there, but you might check out &lt;A href="https://developers.arcgis.com/javascript/latest/" target="_self"&gt;the Developers page&lt;/A&gt; and see if it's worth pursuing.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 20:17:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034668#M33055</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-03-09T20:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034681#M33057</link>
      <description>&lt;P&gt;Should be doable in arcade...something like&lt;/P&gt;&lt;P&gt;var URL = "&lt;A href="https://survey123.arcgis.com/share/(your" target="_blank"&gt;https://survey123.arcgis.com/share/(your&lt;/A&gt; survey)?"&lt;/P&gt;&lt;P&gt;URL += "field:ID=" + $feature.OBJECTID&lt;BR /&gt;URL += "&amp;amp;field:business_address=" + "feature["business_owner_name"]"&lt;BR /&gt;URL += "&amp;amp;field:business_activity=" + "feature["business_activity"]"&lt;/P&gt;&lt;P&gt;return URL&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 20:36:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1034681#M33057</guid>
      <dc:creator>RyanBohan</dc:creator>
      <dc:date>2021-03-09T20:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1036091#M33140</link>
      <description>&lt;P&gt;Hi Doug,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks. The example helps for sure. I have two questions:&lt;/P&gt;&lt;P&gt;1) In your URL Link string above, i see you use both the {expression/expr#} syntax to pass a value and the {FieldName}. I'm just wondering what the difference is in terms of functionality. I'm sure there is good reason but I am new to this, so i am missing something.&lt;/P&gt;&lt;P&gt;2)&amp;nbsp; So when i click my my link in the popup, i am pushed to Survey123 where i edit the record, and then submit my record in S123. However, a new record is created in AGOL instead of an update/edit. In other words, when i click on the link, the URL is pushing the values I want to use to the Survey123 Form, but it looks like its creating a new record versus updating the old one.&lt;/P&gt;&lt;P&gt;I was wondering and hoping you might be able to shed some light on that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Doug. You've helped me out a lot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 19:19:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1036091#M33140</guid>
      <dc:creator>ScottLehto1</dc:creator>
      <dc:date>2021-03-12T19:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1036596#M33168</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;amp;field:EvaluationID={expression/expr0} is to pass a value from Arcade&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;amp;field:PointID={PointID} is to pass a field from Collector or Field Maps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Yes this was all designed&amp;nbsp;to add not edit.&amp;nbsp; App does not support an edit only the web app.&amp;nbsp; Here is one post but there are more.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://gis.stackexchange.com/questions/358709/edit-and-update-existing-features-in-a-collector-app-using-survey123-forms" target="_blank"&gt;https://gis.stackexchange.com/questions/358709/edit-and-update-existing-features-in-a-collector-app-using-survey123-forms&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I personally always add records vs edit to track all visits.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 13:43:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1036596#M33168</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-03-15T13:43:12Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1122640#M39029</link>
      <description>&lt;P&gt;Note it seems like the field list bug is now fixed.&amp;nbsp; That means you can do this and it will be much faster for large layers.&lt;/P&gt;&lt;P&gt;var tbl = Filter(FeatureSetByName($map,"Points", ["DesignLat"], false), sql);&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 19:53:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1122640#M39029</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2021-12-03T19:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Auto-populate survey with attributes from more than one layer</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1590190#M61429</link>
      <description>&lt;P&gt;I have been searching the community for weeks now looking for ideas and I think you maybe speaking to what I need to do. Let me run what I'm trying to get past you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using offline map and survey. I have a popup in layer &lt;STRONG&gt;A &lt;/STRONG&gt;(the selected layer)&amp;nbsp;with URL using callup fields of the feature in layer &lt;STRONG&gt;A&lt;/STRONG&gt; the user has interacted with (pushed on) to populate in the survey.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RichardPasquale_1-1740675107926.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/126544i2BEF6A014BB93E1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardPasquale_1-1740675107926.png" alt="RichardPasquale_1-1740675107926.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am hoping to add to this URL, is a way to also callup a field in Layer &lt;STRONG&gt;D &lt;/STRONG&gt;(circle in yellow) of the feature with the matching attribute X (in orange) from the feature selected, thus returning a value from a different layer in the same map which shares a common value&amp;nbsp; to the feature selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My idea was something like:&lt;/P&gt;&lt;P&gt;Field X = (in &lt;EM&gt;layer ID &lt;/EM&gt;reference feature with field Y matching field Y {return value to populate}&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;amp;field:DateCompleted=(id=0cf6839995f34aafb01a5459d7f6205d,(SUID=SUID){DATE_COMPLETED})&lt;/P&gt;&lt;P&gt;I feel like I'm note even explaining this right&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2025 16:56:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/auto-populate-survey-with-attributes-from-more/m-p/1590190#M61429</guid>
      <dc:creator>RichardPasquale</dc:creator>
      <dc:date>2025-02-27T16:56:06Z</dc:date>
    </item>
  </channel>
</rss>

