<?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: how to read a field from a featureset in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/how-to-read-a-field-from-a-featureset/m-p/1164405#M3014</link>
    <description>&lt;P&gt;Your expression is returning a feature set. You probably want to use the &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#first" target="_self"&gt;First&lt;/A&gt; function to get the first feature in the intersection result (assuming there's only one or fewer). You also may want to handle the case where the feature does not intersect anything, you can use &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#isempty" target="_self"&gt;IsEmpty&lt;/A&gt; for this.&lt;/P&gt;&lt;P&gt;So it should be similar to this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get name from underlying buffer
var feature1 = $feature
var geometry2 = FeatureSetByName($map,"Wildweiden PairwiseBuffer")

var feature = First(Intersects(feature1, geometry2))
if (IsEmpty(feature)) {
    return null
} else {
    return feature["naam"]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2022 14:11:00 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-04-14T14:11:00Z</dc:date>
    <item>
      <title>how to read a field from a featureset</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/how-to-read-a-field-from-a-featureset/m-p/1164334#M3011</link>
      <description>&lt;P&gt;In my smartform I want to read a field ("naam") from a featureset so I can use that to enter in my new feature.&lt;/P&gt;&lt;P&gt;I managed to select the correct feature from the featureset by it's geographical location:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get name from underlying buffer
var feature1 = $feature
var geometry2 = FeatureSetByName($map,"Wildweiden PairwiseBuffer")

var intersectBufferFS = Intersects(feature1, geometry2)

return intersectBufferFS&lt;/LI-CODE&gt;&lt;P&gt;which results in:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BertKraan1_1-1649930278768.png" style="width: 627px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/38890i18DB2D98FE86CC3B/image-dimensions/627x177?v=v2" width="627" height="177" role="button" title="BertKraan1_1-1649930278768.png" alt="BertKraan1_1-1649930278768.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, how do I extract the third field 'naam' to a string?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for your time,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bert&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 09:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/how-to-read-a-field-from-a-featureset/m-p/1164334#M3011</guid>
      <dc:creator>Gisbert61</dc:creator>
      <dc:date>2022-04-14T09:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to read a field from a featureset</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/how-to-read-a-field-from-a-featureset/m-p/1164405#M3014</link>
      <description>&lt;P&gt;Your expression is returning a feature set. You probably want to use the &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#first" target="_self"&gt;First&lt;/A&gt; function to get the first feature in the intersection result (assuming there's only one or fewer). You also may want to handle the case where the feature does not intersect anything, you can use &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#isempty" target="_self"&gt;IsEmpty&lt;/A&gt; for this.&lt;/P&gt;&lt;P&gt;So it should be similar to this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get name from underlying buffer
var feature1 = $feature
var geometry2 = FeatureSetByName($map,"Wildweiden PairwiseBuffer")

var feature = First(Intersects(feature1, geometry2))
if (IsEmpty(feature)) {
    return null
} else {
    return feature["naam"]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2022 14:11:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/how-to-read-a-field-from-a-featureset/m-p/1164405#M3014</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-04-14T14:11:00Z</dc:date>
    </item>
  </channel>
</rss>

