<?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 Calculated Expression Not working to pull feature in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-not-working-to-pull-feature/m-p/1347787#M7357</link>
    <description>&lt;P&gt;I am doing inspections and I'm trying to pull in the facility name in the inspection table from the related layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the expression that I'm using, which displays when we test but not in the field map applications.&amp;nbsp;&lt;/P&gt;&lt;P&gt;var sitename = FeatureSetByRelationshipName($feature,"L1GI_Inspection_Sites" , ['fse_name'])&lt;BR /&gt;var site = First(sitename)&lt;BR /&gt;if (!IsEmpty(site)) {&lt;BR /&gt;return site['fse_name']&lt;BR /&gt;} else {&lt;BR /&gt;return null&lt;BR /&gt;}&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2023 16:53:05 GMT</pubDate>
    <dc:creator>DWebb</dc:creator>
    <dc:date>2023-11-09T16:53:05Z</dc:date>
    <item>
      <title>Calculated Expression Not working to pull feature</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-not-working-to-pull-feature/m-p/1347787#M7357</link>
      <description>&lt;P&gt;I am doing inspections and I'm trying to pull in the facility name in the inspection table from the related layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the expression that I'm using, which displays when we test but not in the field map applications.&amp;nbsp;&lt;/P&gt;&lt;P&gt;var sitename = FeatureSetByRelationshipName($feature,"L1GI_Inspection_Sites" , ['fse_name'])&lt;BR /&gt;var site = First(sitename)&lt;BR /&gt;if (!IsEmpty(site)) {&lt;BR /&gt;return site['fse_name']&lt;BR /&gt;} else {&lt;BR /&gt;return null&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 16:53:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-not-working-to-pull-feature/m-p/1347787#M7357</guid>
      <dc:creator>DWebb</dc:creator>
      <dc:date>2023-11-09T16:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Expression Not working to pull feature</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-not-working-to-pull-feature/m-p/1347929#M7359</link>
      <description>&lt;P&gt;A few other geonet posts have observed buggy things happening with FeatureSetByRelationshipName. I use the below expression using FeatureSetByID instead, with a filter to match primary key to foreign key and it works well for us:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var parent_id = $feature.ParentGUID_

var related_Manholes = FeatureSetById($datastore, "6",['GlobalID', 'FacilityID'], false)

var parent_Manhole = First(Filter(related_Manholes, 'GlobalID = @parent_id'))

if(parent_Manhole == null){
return
}
else {
return parent_Manhole.FacilityID
}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 09 Nov 2023 20:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/calculated-expression-not-working-to-pull-feature/m-p/1347929#M7359</guid>
      <dc:creator>marksm_macomb</dc:creator>
      <dc:date>2023-11-09T20:18:59Z</dc:date>
    </item>
  </channel>
</rss>

