<?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: integrating two layers into capture field arcade expression in ArcGIS QuickCapture Questions</title>
    <link>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1416801#M1245</link>
    <description>&lt;P&gt;Hi - Unfortunately, the arcade expression can only update the field/layer it has been configured for. The functionality is intended to provide more flexibility when updating a single field and can't be used to update multiple fields in the target or additional feature layers.&lt;/P&gt;
&lt;P&gt;The best option for your requirement would be to look into web hooks:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=2cYsa6xsxqk" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=2cYsa6xsxqk&lt;/A&gt;&amp;nbsp;- here you could build a scenario that queries and updates multiple layers.&lt;/P&gt;
&lt;P&gt;Further information:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/quickcapture/help/webhooks.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/quickcapture/help/webhooks.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Nov 2024 03:29:28 GMT</pubDate>
    <dc:creator>JohnathanHasthorpe</dc:creator>
    <dc:date>2024-11-18T03:29:28Z</dc:date>
    <item>
      <title>integrating two layers into capture field arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1416258#M1242</link>
      <description>&lt;P&gt;Hi. I would like to write Arcade code that integrates two different layers. Data Collection (DC) Layer will be where photo and attribute data goes. Location Source (LS) layer will have FSA Farm/Tract/Field data that will auto-populate based on the location of the photo taken and this photo and the corresponding capture fields will be saved in the DC layer.&lt;/P&gt;&lt;P&gt;I notice that in the data tab of the button editing pane, only one target feature layer can be added. &lt;STRONG&gt;Is it possible to write Arcade code that will fill in FSA Farm, Tract, and Field numbers into Capture Fields&lt;/STRONG&gt;&amp;nbsp;&lt;STRONG&gt;based on location of the photo? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Note that DC is a point layer, LS is a polygon layer.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2024 18:45:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1416258#M1242</guid>
      <dc:creator>MM598</dc:creator>
      <dc:date>2024-04-27T18:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: integrating two layers into capture field arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1416801#M1245</link>
      <description>&lt;P&gt;Hi - Unfortunately, the arcade expression can only update the field/layer it has been configured for. The functionality is intended to provide more flexibility when updating a single field and can't be used to update multiple fields in the target or additional feature layers.&lt;/P&gt;
&lt;P&gt;The best option for your requirement would be to look into web hooks:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=2cYsa6xsxqk" target="_blank" rel="noopener"&gt;https://www.youtube.com/watch?v=2cYsa6xsxqk&lt;/A&gt;&amp;nbsp;- here you could build a scenario that queries and updates multiple layers.&lt;/P&gt;
&lt;P&gt;Further information:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/quickcapture/help/webhooks.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/quickcapture/help/webhooks.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 03:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1416801#M1245</guid>
      <dc:creator>JohnathanHasthorpe</dc:creator>
      <dc:date>2024-11-18T03:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: integrating two layers into capture field arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1417106#M1246</link>
      <description>&lt;P&gt;Hi Johnathan. I actually only need to update one field in one layer (DC). The other layer (LS) does not need to be updated, but it would be used as a data source. The Arcade code would use the polygons in LS to see which intersects with the point in DC, then a field in DC would be updated.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 16:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1417106#M1246</guid>
      <dc:creator>MM598</dc:creator>
      <dc:date>2024-04-30T16:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: integrating two layers into capture field arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1417338#M1247</link>
      <description>&lt;P&gt;Apologies, in that case, you just need to add the LS layer to a web map and set it as the QuickCapture project map.&lt;/P&gt;&lt;P&gt;You can then use $map to reference the LS layer by name.&lt;/P&gt;&lt;P&gt;Here is an example that grabs the &lt;STRONG&gt;Regions&lt;/STRONG&gt; polygon layer in the project web map and uses it for an intersect between it and the captured feature ($feature). It returns the region &lt;STRONG&gt;name &lt;/STRONG&gt;for the intersected polygon:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Create a feature set using the 'Regions' layer in the map&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var regions = FeatureSetByName($map, 'Regions', ['name']);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Intersect the current location with the regions and&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// get the first region&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var region = First(Intersects($feature, regions));&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// If the current location does intersect a feature,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// return the name of the region. Otherwise, return null&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if (HasValue(region, "name")) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;return region['name'];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;} else {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;return null;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You should be able to modify the above by updating the layer name ('Regions') and returned field ('name' and "name").&lt;/P&gt;&lt;P&gt;Let me know how you go.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 23:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-quickcapture-questions/integrating-two-layers-into-capture-field-arcade/m-p/1417338#M1247</guid>
      <dc:creator>JohnathanHasthorpe</dc:creator>
      <dc:date>2024-04-30T23:58:04Z</dc:date>
    </item>
  </channel>
</rss>

