<?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: Field Maps, Arcade, Auto Populating Fields in Related Table from Other Related Table in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-arcade-auto-populating-fields-in/m-p/1305173#M6426</link>
    <description>&lt;P&gt;I'm not at all sure I understand your data structure...&lt;/P&gt;&lt;P&gt;Here's what I imagine from your description:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Survey_Locations probably contains the actual survey results.&lt;/LI&gt;&lt;LI&gt;Route_Data contains high-level attributes of the current survey. 1-m relationship with Survey_Locations, meaning one route can have many survey locations.&lt;/LI&gt;&lt;LI&gt;Call_Point_Data contains fixed (?) points along the route where you take surveys (?), but here you only store meta data (time, bearing). 1-m relationship with Survey_Locations, meaning that one call point can have many survey locations (?)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You explained Route_Data and Call_Point_Data. These seem like what you're interested in. What's the deal with Survey_Locations? Are they the actual survey results at a call point? Are the call points fixed for multiple survey on the same route?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An extract of your actual data would be helpful, either here or in a pm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you want to implement the Attribute Rule on Survey_Locations:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule on Survey_Locations
// field: empty
// triggers: Insert
// exclude from application evaluation

// get the related route
var route = First(FeaturesetByRelationshipName($feature, "SurveyLocations_Routes"))
if(route == null) { return }

// get the related call points
var call_points = FeaturesetByRelationshipName($feature, "SurveyLocations_CallPoints")

// create and fill an array that contains the updates to be made to Call_Points
var updates = []
for(var c in call_points) {
    var update = {
        globalID: c.GlobalID, // alternatively:  objectID: c.OBJECTID
        attributes: {
            RouteAttribute1: route.RouteAttribute1,
            RouteAttribute2: route.RouteAttribute2,
        }
    Push(updates, update)
}

// return the edit instruction
return {
    edit: [{
        className: "SPOW_Call_point_Data",
        updates: updates
    }]
}&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 02 Jul 2023 08:52:25 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-07-02T08:52:25Z</dc:date>
    <item>
      <title>Field Maps, Arcade, Auto Populating Fields in Related Table from Other Related Table</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-arcade-auto-populating-fields-in/m-p/1302308#M6372</link>
      <description>&lt;P&gt;Hello! I have a feature class of survey points (SPOW_Survey_Locations) with two related tables (both are 1:many), one that contains survey route data (SPOW_Route_Data), and the other containing call point data (SPOW_Call_Point_Data). As a bit of context, there are route-level fields such as visit #, outing #, precipitation, temperature, moon phase, etc. that are completed at the start of a survey and represent the entire route. Then there are call points along a route where data being collected includes start time, end time, a bearing if a response is elicited, etc.. The data are being collected in Field Maps and having the two related tables allows route- and call point-level questions to be asked separately without using conditional visibility. The end user will want to see a table with individual call point data along with the associated route data, so I’m hoping I can auto populate the route fields in the call point related table from the route related table. I’m familiar with attributes rule that auto populate a shared field in a related table from a parent feature class (e.g., FeatureSetByRelationshipName), but I’m wondering how I would go about populating multiple shared fields in one related table from another related table, where the field I am interested in populating is not a field in the parent feature class, but a shared field among related tables. Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2023 00:21:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-arcade-auto-populating-fields-in/m-p/1302308#M6372</guid>
      <dc:creator>Jaime_Carlino</dc:creator>
      <dc:date>2023-06-23T00:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field Maps, Arcade, Auto Populating Fields in Related Table from Other Related Table</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-arcade-auto-populating-fields-in/m-p/1305173#M6426</link>
      <description>&lt;P&gt;I'm not at all sure I understand your data structure...&lt;/P&gt;&lt;P&gt;Here's what I imagine from your description:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Survey_Locations probably contains the actual survey results.&lt;/LI&gt;&lt;LI&gt;Route_Data contains high-level attributes of the current survey. 1-m relationship with Survey_Locations, meaning one route can have many survey locations.&lt;/LI&gt;&lt;LI&gt;Call_Point_Data contains fixed (?) points along the route where you take surveys (?), but here you only store meta data (time, bearing). 1-m relationship with Survey_Locations, meaning that one call point can have many survey locations (?)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You explained Route_Data and Call_Point_Data. These seem like what you're interested in. What's the deal with Survey_Locations? Are they the actual survey results at a call point? Are the call points fixed for multiple survey on the same route?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An extract of your actual data would be helpful, either here or in a pm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you want to implement the Attribute Rule on Survey_Locations:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Calculation Attribute Rule on Survey_Locations
// field: empty
// triggers: Insert
// exclude from application evaluation

// get the related route
var route = First(FeaturesetByRelationshipName($feature, "SurveyLocations_Routes"))
if(route == null) { return }

// get the related call points
var call_points = FeaturesetByRelationshipName($feature, "SurveyLocations_CallPoints")

// create and fill an array that contains the updates to be made to Call_Points
var updates = []
for(var c in call_points) {
    var update = {
        globalID: c.GlobalID, // alternatively:  objectID: c.OBJECTID
        attributes: {
            RouteAttribute1: route.RouteAttribute1,
            RouteAttribute2: route.RouteAttribute2,
        }
    Push(updates, update)
}

// return the edit instruction
return {
    edit: [{
        className: "SPOW_Call_point_Data",
        updates: updates
    }]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 02 Jul 2023 08:52:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/field-maps-arcade-auto-populating-fields-in/m-p/1305173#M6426</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-07-02T08:52:25Z</dc:date>
    </item>
  </channel>
</rss>

