<?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: Trying to populate fields by intersect, from another layer in the fieldmap in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251318#M5215</link>
    <description>&lt;P&gt;"&lt;SPAN&gt;I've been trying to use an arcade expression to pass the surveyor name and survey date to another (point) layer using intersects / within, but am having no luck. "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm a bit murky on what you are trying two accomplish.&amp;nbsp; It sounds like you are trying to change another features attributes, rather than the feature in your current edit session.&amp;nbsp; If so, be aware that you can only change the values of the current feature.&amp;nbsp; You can retrieve data from another layer, but only for the purpose of manipulating you current form or feature.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also be aware that the Intersects function has to forms.&amp;nbsp; It can return Boolean (true/false) if comparing two geometries or a featureSet if comparing a featureSet to some inputGeometry.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You may also want to test that&amp;nbsp;&lt;SPAN&gt;Mines_Info is not empty before trying to do the intersect as that may explain your failed to calculate or null object error as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As Sarah mentions above, you can't return a featureSet.&amp;nbsp; The Form Calculation Arcade Profile only supports the return types of Number, Date, or Text.&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/profiles/form-calculation/" target="_blank"&gt;https://developers.arcgis.com/arcade/profiles/form-calculation/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 15:20:03 GMT</pubDate>
    <dc:creator>JustinReynolds</dc:creator>
    <dc:date>2023-01-25T15:20:03Z</dc:date>
    <item>
      <title>Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251116#M5208</link>
      <description>&lt;P&gt;Hello all,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm trying to use Field Maps to create a form for field data collection.&lt;/P&gt;&lt;P&gt;We've got areas that need to be surveyed which I've got as a pre-existing polygon layer.&lt;BR /&gt;&lt;BR /&gt;I've set up the field map to have the survey Location name (which is prepopulated) and then survey date and surveyor's name to be collected when they arrive.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've been trying to use an arcade expression to pass the surveyor name and survey date to another (point) layer using intersects / within, but am having no luck.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Using this code I've at least seen the field-headings in the "test" section:&lt;BR /&gt;var Mines_Info = FeatureSetByName($map, "Mine_Locations")&lt;BR /&gt;var MInfo = Intersects($feature, Mines_Info)&lt;BR /&gt;return MInfo&lt;BR /&gt;&lt;BR /&gt;But I'm at a loss as to how to pass the information I want through. I either get a "Cannot access property of a null object" error in the arcade window, or a "Failed to calculate" error on the Field Maps app.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankyou!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 02:59:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251116#M5208</guid>
      <dc:creator>DavidCarroll94</dc:creator>
      <dc:date>2023-01-25T02:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251207#M5209</link>
      <description>&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;The issue is likely because you are returning a feature set rather than a specific feature even though there is an intersect. You also need to tell the Arcade editor what field value you want to return.&lt;/P&gt;&lt;P&gt;var Mines_Info = FeatureSetByName($map, "Mine_Locations", [‘the field name you want to return’])&lt;/P&gt;&lt;P&gt;MInfo= first(intersects($feature, Mines_Info)&lt;/P&gt;&lt;P&gt;Return Minfo[‘the field name you want to return’]&lt;/P&gt;&lt;P&gt;Another option is you could use the following Arcade functions to return the user name and date.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date&lt;/STRONG&gt;: Now() this will returns the current date and time in the local time of the client.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;User Name&lt;/STRONG&gt;: GetUser($layer).fullName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a blog&lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/" target="_blank"&gt; here&lt;/A&gt; with the most common expressions used in Field Maps in case this helps for future expressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 11:47:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251207#M5209</guid>
      <dc:creator>SarahSaint-Ruth</dc:creator>
      <dc:date>2023-01-25T11:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251318#M5215</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;I've been trying to use an arcade expression to pass the surveyor name and survey date to another (point) layer using intersects / within, but am having no luck. "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I'm a bit murky on what you are trying two accomplish.&amp;nbsp; It sounds like you are trying to change another features attributes, rather than the feature in your current edit session.&amp;nbsp; If so, be aware that you can only change the values of the current feature.&amp;nbsp; You can retrieve data from another layer, but only for the purpose of manipulating you current form or feature.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also be aware that the Intersects function has to forms.&amp;nbsp; It can return Boolean (true/false) if comparing two geometries or a featureSet if comparing a featureSet to some inputGeometry.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You may also want to test that&amp;nbsp;&lt;SPAN&gt;Mines_Info is not empty before trying to do the intersect as that may explain your failed to calculate or null object error as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As Sarah mentions above, you can't return a featureSet.&amp;nbsp; The Form Calculation Arcade Profile only supports the return types of Number, Date, or Text.&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/profiles/form-calculation/" target="_blank"&gt;https://developers.arcgis.com/arcade/profiles/form-calculation/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 15:20:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1251318#M5215</guid>
      <dc:creator>JustinReynolds</dc:creator>
      <dc:date>2023-01-25T15:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1340755#M7228</link>
      <description>&lt;P&gt;Nope - im also getting the same kind of errors&lt;/P&gt;&lt;P&gt;the return does not like: feature['value']&lt;/P&gt;&lt;P&gt;it also does not like First(Intersects(&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_0-1698110099447.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83761iD9DE0A590CEB0801/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_0-1698110099447.png" alt="NevilleWilson_Everick_0-1698110099447.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_1-1698110258111.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83762i471279BCD9CD133D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_1-1698110258111.png" alt="NevilleWilson_Everick_1-1698110258111.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_2-1698110328363.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83763i38D7FD5696C3342C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_2-1698110328363.png" alt="NevilleWilson_Everick_2-1698110328363.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_3-1698110361205.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83764i4D84758D1BD782C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_3-1698110361205.png" alt="NevilleWilson_Everick_3-1698110361205.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_4-1698110455161.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83765i6F35F67ABF4F7A15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_4-1698110455161.png" alt="NevilleWilson_Everick_4-1698110455161.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;further: it is giving bad / inconsistent results between AGOL,&amp;nbsp;&lt;/P&gt;&lt;P&gt;field maps in online mode, and field maps offline mode&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_5-1698110551916.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83766iAC3C5A22CBC80D3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_5-1698110551916.png" alt="NevilleWilson_Everick_5-1698110551916.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NevilleWilson_Everick_6-1698111106435.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/83767i50D8E2ABB1A20E7E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NevilleWilson_Everick_6-1698111106435.png" alt="NevilleWilson_Everick_6-1698111106435.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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 01:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1340755#M7228</guid>
      <dc:creator>NevilleWilson_Everick</dc:creator>
      <dc:date>2023-10-24T01:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1351461#M7411</link>
      <description>&lt;P&gt;I am doing this very same thing.&amp;nbsp; I am intersecting a point with an existing parcel polygon layer and trying to return the Parcel ID of the parcel polygon&amp;nbsp; I have the code written as you have above.&amp;nbsp; It is returning the Parcel ID of the very first polygon from from the parcel layer with the objectID = 1.&amp;nbsp; My guess is due to returning the feature set instead of the feature, but not sure how to fix this.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;var parcel = FeatureSetByName($map, 'Parcel Lines2', ['ParcelID']);&lt;/P&gt;&lt;P&gt;var parcInter = First(Intersects($feature, parcel));&lt;/P&gt;&lt;P&gt;return parcInter['ParcelID'];&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 14:43:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1351461#M7411</guid>
      <dc:creator>DarrylAlbert</dc:creator>
      <dc:date>2023-11-20T14:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1379410#M7893</link>
      <description>&lt;P&gt;I am having an issue with this also.&amp;nbsp; The code below works great in ArcPro 3.2.1 but the code doesn't go with the feature layer when published to AGOL and copy/paste the same code to the features in agol does nothing at all.&amp;nbsp; This is capturing the Meadow name from a Meadows layer and populating the Plantspecies Meadow field with the meadow name.&lt;/P&gt;&lt;P&gt;var fsMeadows = FeatureSetByName($datastore, "Meadows", ["Meadow"])&lt;BR /&gt;var fsMeadowsIntersect = Intersects(fsMeadows, $feature)&lt;BR /&gt;var Meadows = First(fsMeadowsIntersect)&lt;/P&gt;&lt;P&gt;if (Meadows == null) return {"errorMessage": "Meadow not found"}&lt;/P&gt;&lt;P&gt;return Meadows.Meadow&lt;/P&gt;&lt;P&gt;Instructions say this should work in agol but it doesn't!&amp;nbsp; Ref this discussion:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-ideas/support-for-attribute-rules-in-arcgis-online/idi-p/935824" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-ideas/support-for-attribute-rules-in-arcgis-online/idi-p/935824&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 21:59:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1379410#M7893</guid>
      <dc:creator>D_AnneHammond</dc:creator>
      <dc:date>2024-02-07T21:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1415595#M8453</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/62928"&gt;@D_AnneHammond&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your if statement might be the issue there if you are still having issues.&amp;nbsp; It should go more like this:&lt;/P&gt;&lt;P&gt;if (Meadows == null) {&lt;/P&gt;&lt;P&gt;return "Meadow not found"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;else return fsMeadows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm curious can you perform an intersect to identify the largest intersecting piece?&amp;nbsp; For example, if I'm trying to populate a field from an underlying soils layer to a forest stand layer.&amp;nbsp; The forest stand may intersect several different soils, but how can I get an attribute from the soil that encompasses the largest acreage of intersection?&amp;nbsp; "First" won't always get the right one.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 21:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1415595#M8453</guid>
      <dc:creator>LukeGilner1</dc:creator>
      <dc:date>2024-04-25T21:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1415630#M8454</link>
      <description>&lt;P&gt;Thanks Luke, I'll try it for sure, I see the difference in form.&lt;/P&gt;&lt;P&gt;Soils are a particularly odd beast where each soils poly is it's own mix of soils.&amp;nbsp; I'm facing the same dilemma in an experience builder project. I feel the need for an intermediary step that creates a temporary layer with the predominance calculated then grab the info from that temporary layer but honestly I haven't made progress on that side project as yet.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 22:21:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1415630#M8454</guid>
      <dc:creator>D_AnneHammond</dc:creator>
      <dc:date>2024-04-25T22:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to populate fields by intersect, from another layer in the fieldmap</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1495336#M8913</link>
      <description>&lt;P&gt;This eventually worked for me, but with the following modification:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;var&lt;/STRONG&gt; MInfo= first(intersects(Mines_Info, $feature)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 13:33:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/trying-to-populate-fields-by-intersect-from/m-p/1495336#M8913</guid>
      <dc:creator>IanLane</dc:creator>
      <dc:date>2024-06-20T13:33:55Z</dc:date>
    </item>
  </channel>
</rss>

