<?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 Another query re populating a Field Maps related table field. in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632170#M11078</link>
    <description>&lt;P&gt;&lt;FONT size="3"&gt;Greetings all,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Yet another query about populating a related table field from the parent feature layer table via a calculated expression.&amp;nbsp; I’ve followed the video below, checked it three times and worked through all ChatGPT suggestions but can’t get this to work.&amp;nbsp; It runs in the Field Maps form test and returns null but fails completely in Field Maps when adding a record to the related table.&amp;nbsp; Yes, the relationship class name is odd because it was published from a QA portal environment.&amp;nbsp; Might that be the issue?&amp;nbsp; I’ve not tried replacing the relationship class.&amp;nbsp; If I replace the relationship class will that affect the form I’ve created?&amp;nbsp; My logic says no since it’s only a connector but thought I would ask the community before hand.&amp;nbsp; Many thanks in advance for any insight.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Note: The field I'&lt;/FONT&gt;&lt;FONT size="3"&gt;m trying to populate, “LOCATION_ID”, does exist in both tables and is not the key between tables.&amp;nbsp; &amp;nbsp;(Those are Globalid in the feature layer and GUID field in the related table.)&amp;nbsp; Also,&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;I am not creating new features, only inspecting existing locations so cannot apply an attribute rule.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;A href="https://www.youtube.com/watch?v=TbDY0IpaDoI" target="_blank"&gt;Using Calculated Expressions with Related Records in ArcGIS Field Maps - YouTube&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Expression:&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var locid = FeatureSetByRelationshipName($feature, "GISDEVREAD.DrainageClearingLocations", ['LOCATION_ID'])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var feature1 =First(locid)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;if (!IsEmpty(feature1)) {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; return feature['LOCATION_ID']&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; return null&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Scott G&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jul 2025 18:46:47 GMT</pubDate>
    <dc:creator>Scott_Gowan</dc:creator>
    <dc:date>2025-07-10T18:46:47Z</dc:date>
    <item>
      <title>Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632170#M11078</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;Greetings all,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Yet another query about populating a related table field from the parent feature layer table via a calculated expression.&amp;nbsp; I’ve followed the video below, checked it three times and worked through all ChatGPT suggestions but can’t get this to work.&amp;nbsp; It runs in the Field Maps form test and returns null but fails completely in Field Maps when adding a record to the related table.&amp;nbsp; Yes, the relationship class name is odd because it was published from a QA portal environment.&amp;nbsp; Might that be the issue?&amp;nbsp; I’ve not tried replacing the relationship class.&amp;nbsp; If I replace the relationship class will that affect the form I’ve created?&amp;nbsp; My logic says no since it’s only a connector but thought I would ask the community before hand.&amp;nbsp; Many thanks in advance for any insight.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Note: The field I'&lt;/FONT&gt;&lt;FONT size="3"&gt;m trying to populate, “LOCATION_ID”, does exist in both tables and is not the key between tables.&amp;nbsp; &amp;nbsp;(Those are Globalid in the feature layer and GUID field in the related table.)&amp;nbsp; Also,&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;I am not creating new features, only inspecting existing locations so cannot apply an attribute rule.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;A href="https://www.youtube.com/watch?v=TbDY0IpaDoI" target="_blank"&gt;Using Calculated Expressions with Related Records in ArcGIS Field Maps - YouTube&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Expression:&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var locid = FeatureSetByRelationshipName($feature, "GISDEVREAD.DrainageClearingLocations", ['LOCATION_ID'])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var feature1 =First(locid)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;if (!IsEmpty(feature1)) {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; return feature['LOCATION_ID']&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; return null&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Scott G&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 18:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632170#M11078</guid>
      <dc:creator>Scott_Gowan</dc:creator>
      <dc:date>2025-07-10T18:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632193#M11079</link>
      <description>&lt;P&gt;Is that really your relationship name?&amp;nbsp; There used to be a bug where a period in the name would break it but I thought they fixed it.&amp;nbsp; It does seem like a long name though so make sure its just the name and not DBName.RelationshipName.&amp;nbsp; Check the rest page for the service to get the exact name it wants.&lt;/P&gt;&lt;P&gt;If that is correct then I would try writing it out using Filter(FeatureSetByName(), query) way and see if that works.&amp;nbsp; See this post&amp;nbsp;&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/return-a-value-depending-on-if-record-in-related/m-p/1568109" target="_blank"&gt;https://community.esri.com/t5/arcgis-field-maps-questions/return-a-value-depending-on-if-record-in-related/m-p/1568109&lt;/A&gt;&amp;nbsp; and this one&amp;nbsp; &amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-featuresetbyrelationshipname-arcade/td-p/1203294/page/2" target="_blank"&gt;https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-featuresetbyrelationshipname-arcade/td-p/1203294/page/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Hope that does it&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 19:43:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632193#M11079</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-07-10T19:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632236#M11082</link>
      <description>&lt;P&gt;Blindly calling &lt;FONT face="courier new,courier"&gt;First&lt;/FONT&gt; on a FeatureSet causes issues during rule validation -- even if the FeatureSet has data -- so do a&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if (Count(&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;locid) == 0) return&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;before you grab the first feature to avoid issues.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 22:40:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632236#M11082</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2025-07-10T22:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632434#M11090</link>
      <description>&lt;P&gt;Agreed this will get you and I see it posted a lot.&amp;nbsp; I think it is due to this blog post which is wrong IMO.&amp;nbsp; I wrote the Field Maps team directly to fix this post but got no response.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 15:02:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632434#M11090</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2025-07-11T15:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632461#M11092</link>
      <description>&lt;P&gt;Did you copy the arcade directly from the expression in Field Maps Designer? If so it looks like you have a typo:&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var feature1 =First(locid)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;return feature['LOCATION_ID'] - you're missing the "1" in the variable name for the feature.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 15:32:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632461#M11092</guid>
      <dc:creator>ChrisDunn1</dc:creator>
      <dc:date>2025-07-11T15:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632814#M11110</link>
      <description>&lt;P&gt;Thanks Chris,&lt;/P&gt;&lt;P&gt;Thanks for that catch.&amp;nbsp; The missing "1" was actually only a typo in this post.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 13:16:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632814#M11110</guid>
      <dc:creator>Scott_Gowan</dc:creator>
      <dc:date>2025-07-14T13:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Another query re populating a Field Maps related table field.</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632816#M11111</link>
      <description>&lt;P&gt;Updated script with missing "1", same error result.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;Expression:&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var locid = FeatureSetByRelationshipName($feature, "GISDEVREAD.DrainageClearingLocations", ['LOCATION_ID'])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;var feature1 =First(locid)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;if (!IsEmpty(feature1)) {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; return feature1['LOCATION_ID']&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;} else {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;&amp;nbsp; return null&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 13:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/another-query-re-populating-a-field-maps-related/m-p/1632816#M11111</guid>
      <dc:creator>Scott_Gowan</dc:creator>
      <dc:date>2025-07-14T13:19:10Z</dc:date>
    </item>
  </channel>
</rss>

