<?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: auto-populate fields when adding related records in ArcGIS Collector Questions</title>
    <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482218#M8312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also would like to do this - preferably on AGOL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Aug 2018 16:43:30 GMT</pubDate>
    <dc:creator>LisaCasey</dc:creator>
    <dc:date>2018-08-16T16:43:30Z</dc:date>
    <item>
      <title>auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482217#M8311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Someone asked a similar question &lt;A _jive_internal="true" href="https://community.esri.com/thread/124914?q=how to auto-populate a field in a related table"&gt;here&lt;/A&gt; with no replies so I'll ask it again in a different way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to auto-populate a field (in addition to the unique ID) from a parent feature service to a related record?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have my unique ID auto-populating when creating new related records but I would like other fields to transfer to my related record as well. For example, I would like the manhole # and the serial # of the monitor to transfer from the original point feature service to the related table (maintenance records). Auto-populating fields would save the field-guys from typing this info over and over.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="118250" alt="Capture.JPG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/118250_Capture.JPG" style="width: 620px; height: 358px;" /&gt;&lt;/P&gt;&lt;P&gt;I've experimented with a few varieties of relationship classes without success. Any ideas would be great. Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Caleb Anderson&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Contacted ESRI and was told by support that this is not possible &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Caleb Anderson&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best I could come up with for a workaround (after deep-diving into some other forums) is to move the data from the cloud to our local SDE. Our main brain GIS people will make the data available for collector and field collection work-flows will continue as usual. With the data stored locally, I can automate the following tool to "auto-populate" specified fields (field personnel leave the field blank and the tool runs nightly and replaced null values with data from a parent feature class field):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SN_Fix.PNG" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/119365_SN_Fix.PNG" style="width: 620px; height: 147px;" /&gt;&lt;/P&gt;&lt;P&gt;The "Calculate Field" in the above model builder tool has the following script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/119492_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it out locally and it works but I haven't tried it through our SDE yet. There will have to be some coordination to make this happen but I don't see why it wouldn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2015 21:16:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482217#M8311</guid>
      <dc:creator>CalebAnderson2</dc:creator>
      <dc:date>2015-07-20T21:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482218#M8312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also would like to do this - preferably on AGOL&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 16:43:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482218#M8312</guid>
      <dc:creator>LisaCasey</dc:creator>
      <dc:date>2018-08-16T16:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482219#M8313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can this be done???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2019 04:33:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482219#M8313</guid>
      <dc:creator>deleted-user-yC5VkbyXzrQR</dc:creator>
      <dc:date>2019-02-15T04:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482220#M8314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've recently come across this issue myself and found a github that populates a parent FC from a populated related within ArcGIS Pro's Attribute Rules:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcade-expressions/blob/master/attribute_rule_calculation/UpdateParentFeature.md" title="https://github.com/Esri/arcade-expressions/blob/master/attribute_rule_calculation/UpdateParentFeature.md"&gt;arcade-expressions/UpdateParentFeature.md at master · Esri/arcade-expressions · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a little tweaking I was able to reverse this to populate the related attribute table when populating the parent FC:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// This rule will update an attribute in the child table&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Build a relationship class from the Feature Class (origin) to the Table (foreign) based on GlobalID&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Store the child table globalID from the key field in the relationship class&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;var childGlobalID = $feature.ChildGlobalID;&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;if (IsEmpty(childGlobalID))&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; return childGlobalID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// force to upper as the sql is case sensitive&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;childGlobalID = Upper(childGlobalID);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Using the GDB name, get the parent classes records and Global ID field&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;var child_class = FeatureSetByName($datastore, "DBname.owner.TableName", ["GlobalID", 'ChildTableFeatureName'], false);&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Filter the parent class for only related features&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;var parent_records = Filter(child_class, "globalid = @childGlobalID");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;var updates = [];&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;var i = 0;&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;var new_value = 'UpdatedFieldValue';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Loop through each &amp;nbsp;feature, create a dict of the Global ID and the new value date&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;for (var row in parent_records) {&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; // If the parent row is null or has a different value, updated it&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; if (IsEmpty(row['ChildTableFeatureName']) || row['ChildTableFeatureName'] != new_value)&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; updates[i++] = {&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'globalid': childGlobalID,&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'attributes': {"ChildTableFeatureName": new_value} &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Return the original value in the result parameter, as to not lost the entered value&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;// Using the edit parameter, &amp;nbsp;return the class and list of updates&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;return {&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;'result': childGlobalID,&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;'edit': [&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {'className': 'DBname.owner.TableName',&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'updates': updates&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&amp;nbsp;&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;BR clear="none" data-aura-rendered-by="23626:0" style="color: #3e3e3c; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3e3e3c; background-color: #ffffff;"&gt;I have not been able to get this working for AGOL yet but I am trying.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Oct 2020 14:44:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482220#M8314</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-10-13T14:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482221#M8315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/336292"&gt;Brady Ross&lt;/A&gt;&amp;nbsp;support for attribute rules is currently limited to ArcGIS Enterprise feature services.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 07:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482221#M8315</guid>
      <dc:creator>DougMorgenthaler</dc:creator>
      <dc:date>2020-10-16T07:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482222#M8316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Aha! Thanks &lt;A href="https://community.esri.com/migrated-users/3161"&gt;Doug Morgenthaler&lt;/A&gt;‌!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 14:50:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/482222#M8316</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-10-16T14:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1023332#M13024</link>
      <description>&lt;P&gt;Hi Brady,&lt;/P&gt;&lt;P&gt;I have come across your code and I believe it is the answer to my problem. Unfortunatelly I am not being very successful in applying it to my case which I think is a bit different.&lt;/P&gt;&lt;P&gt;I am working in ArcGIS Pro 2.7 and Portal 10.7.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have a feature class with GlobalID and Fields A and B. I have a relationship class of 1:M to a table (FK: ParentGlobaIID) with corresponding fields A and B.&lt;/P&gt;&lt;P&gt;When adding a new entry in the related table, I'd like to auto populate fields A and B with the values of A and B in the parent feature class.&lt;/P&gt;&lt;P&gt;I am sorry if this is obvious but I cannot make this work for me. Could you please help me out?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks is advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 10:38:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1023332#M13024</guid>
      <dc:creator>RitaMatildes</dc:creator>
      <dc:date>2021-02-04T10:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1073820#M13318</link>
      <description>&lt;P&gt;@Anonymous User, did you create this rule in the related table attribute rules or the parent feature class? And what did you use for the&amp;nbsp;&lt;SPAN&gt;UpdatedFieldValue? That should be a value from the parent FC, correct, so what should the syntax look like if this rule is being created in the related table list?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 18:14:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1073820#M13318</guid>
      <dc:creator>JohnWatson_EBA</dc:creator>
      <dc:date>2021-06-29T18:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1076949#M13332</link>
      <description>&lt;P&gt;I was able to use the below code to success with Attribute Rules in ArcPro using Arcade.&lt;/P&gt;&lt;P&gt;After relating the two fields, only thing is you need to alter a value to initiate the change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;// first read out the Foreign Key of the Destination Table (Feature Class)
var fcID = $feature.F_streetnameid
// access the Orgin table (Table)
var tbl = FeatureSetByName($datastore, 'MasterRoadName');
// create a sql expression to query on Primary Key
var sql = "streetnameid = '" + fcID + "'";
var related_data = Filter(tbl, sql);
// count the resulting records
var cnt = Count(related_data);
// initiate a variable to hold the result
var results = "";

// check if there are related records found for the current ID
if (cnt &amp;gt; 0) {
// loop through related records
    for (var row in related_data) {
// read some data and create the line you want
        var line = row.roadpretype;
// add the line to the result
        results +=line;
    }
} else {
    results = "Need Segment Table relate";
}
// return the result
return results;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 19:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1076949#M13332</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-07-08T19:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1261383#M13739</link>
      <description>&lt;P&gt;I'm wondering if anyone has made progress on implementing this in AGO / Field Maps?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Feb 2023 13:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1261383#M13739</guid>
      <dc:creator>ILoveMap</dc:creator>
      <dc:date>2023-02-24T13:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1265832#M13742</link>
      <description>&lt;P&gt;Also interested in a solution to this for hosted featureclasses and related tables in ArcGIS Enterprise10.9.&lt;/P&gt;&lt;P&gt;I understand that calculated expressions in Field Maps may solve it for us (at the point of data capture), but as an organisation we're at least 6 months away from upgrading to Enterprise 11.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seeking a solution that allows this to be automated post data capture in the Portal environment, or at worst case the workaround is&amp;nbsp;&lt;SPAN&gt;Attribute Rules in ArcPro and running this client-side?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 23:51:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1265832#M13742</guid>
      <dc:creator>ChrisH2</dc:creator>
      <dc:date>2023-03-08T23:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: auto-populate fields when adding related records</title>
      <link>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1384599#M13816</link>
      <description>&lt;P&gt;Yes,&amp;nbsp;add a calculation, like the one in this video:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=BWXZzYAIkKk" target="_blank"&gt;https://www.youtube.com/watch?v=BWXZzYAIkKk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Feb 2024 20:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-collector-questions/auto-populate-fields-when-adding-related-records/m-p/1384599#M13816</guid>
      <dc:creator>MattyMaps</dc:creator>
      <dc:date>2024-02-20T20:49:49Z</dc:date>
    </item>
  </channel>
</rss>

