<?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 Fetch an attribute from a related record in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1282731#M5834</link>
    <description>&lt;P&gt;Hello. I am a Survey123 user and I would like to switch to Field Maps. In the article Common calculated expressions for ArcGIS Field Maps - Point 2 - Fetch an attribute from a related record, there is a sample script that should do exactly what I need. Only that the explanation, for me who is not a programmer, is unclear or incomplete. This is the script:&lt;BR /&gt;// Get the feature set for the hydrants&lt;BR /&gt;var hydrants = FeatureSetByRelationshipName($feature, 'wHydrant', ['facilityid'], true)&lt;BR /&gt;// Get the first hydrant (should only be one)&lt;BR /&gt;var hydrant = First(hydrants)&lt;BR /&gt;// If there was a hydrant, return the facilityid of it,&lt;BR /&gt;// Otherwise, return null&lt;BR /&gt;if (!IsEmpty(hydrant)) {&lt;BR /&gt;return hydrant['facilityid']&lt;BR /&gt;} else {&lt;BR /&gt;return null&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;It seems to me that wHydrant is the name of the relationship. Where do I find the name of a relationship between a feature layer and a related table created with Survey123? Thanks for your help.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 10:41:05 GMT</pubDate>
    <dc:creator>AntonioPatera</dc:creator>
    <dc:date>2023-04-26T10:41:05Z</dc:date>
    <item>
      <title>Fetch an attribute from a related record</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1282731#M5834</link>
      <description>&lt;P&gt;Hello. I am a Survey123 user and I would like to switch to Field Maps. In the article Common calculated expressions for ArcGIS Field Maps - Point 2 - Fetch an attribute from a related record, there is a sample script that should do exactly what I need. Only that the explanation, for me who is not a programmer, is unclear or incomplete. This is the script:&lt;BR /&gt;// Get the feature set for the hydrants&lt;BR /&gt;var hydrants = FeatureSetByRelationshipName($feature, 'wHydrant', ['facilityid'], true)&lt;BR /&gt;// Get the first hydrant (should only be one)&lt;BR /&gt;var hydrant = First(hydrants)&lt;BR /&gt;// If there was a hydrant, return the facilityid of it,&lt;BR /&gt;// Otherwise, return null&lt;BR /&gt;if (!IsEmpty(hydrant)) {&lt;BR /&gt;return hydrant['facilityid']&lt;BR /&gt;} else {&lt;BR /&gt;return null&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;It seems to me that wHydrant is the name of the relationship. Where do I find the name of a relationship between a feature layer and a related table created with Survey123? Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 10:41:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1282731#M5834</guid>
      <dc:creator>AntonioPatera</dc:creator>
      <dc:date>2023-04-26T10:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch an attribute from a related record</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1282797#M5838</link>
      <description>&lt;P&gt;You are close.&amp;nbsp; Note set geometry to false since you so not need it.&lt;/P&gt;&lt;P&gt;var tbl = FeatureSetByRelationshipName($feature, "Points", ['DesignLong'], false);&lt;BR /&gt;return First(tbl).DesignLong&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 13:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1282797#M5838</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2023-04-26T13:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Fetch an attribute from a related record</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1283790#M5851</link>
      <description>&lt;P&gt;Thank you very much for the suggestion. I will try it next week and keep you informed.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 12:11:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/fetch-an-attribute-from-a-related-record/m-p/1283790#M5851</guid>
      <dc:creator>AntonioPatera</dc:creator>
      <dc:date>2023-04-28T12:11:58Z</dc:date>
    </item>
  </channel>
</rss>

