<?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 Update related table in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/update-related-table/m-p/536698#M6568</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to build an application to edit related table records and I'm building off of the code in this &lt;A _jive_internal="true" href="https://community.esri.com/message/717313-re-retrieve-records-from-related-table-in-arcgis-runtime-sdk-for-net?commentID=717313#comment-717313"&gt;discussion&lt;/A&gt;, however, it "seems" I should be able to loop through the related features and update the "Comments" field to a value of "Test".&amp;nbsp; When I run the following code it continues the loop and doesn't kick out once all results have cycled through.&amp;nbsp; Not sure if I've got something wrong or there is something else going on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I comment out the await line in the loop, the process kicks out of the loop as expected....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var queryResults = await table.QueryRelatedFeaturesAsync(feature); &lt;BR /&gt; foreach (var queryResult in queryResults.ToArray())&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;foreach (var f in queryResult)&lt;BR /&gt; {&lt;BR /&gt; var sft = (GeodatabaseFeatureTable)f.FeatureTable;&lt;BR /&gt; var id = (long)f.Attributes[sft.ObjectIdField];&lt;/P&gt;&lt;P&gt;f.Attributes["Comments"] = "Test";&lt;BR /&gt; await f.FeatureTable.UpdateFeatureAsync(f);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Nov 2017 19:45:48 GMT</pubDate>
    <dc:creator>JerrySimmons_GISP</dc:creator>
    <dc:date>2017-11-14T19:45:48Z</dc:date>
    <item>
      <title>Update related table</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/update-related-table/m-p/536698#M6568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to build an application to edit related table records and I'm building off of the code in this &lt;A _jive_internal="true" href="https://community.esri.com/message/717313-re-retrieve-records-from-related-table-in-arcgis-runtime-sdk-for-net?commentID=717313#comment-717313"&gt;discussion&lt;/A&gt;, however, it "seems" I should be able to loop through the related features and update the "Comments" field to a value of "Test".&amp;nbsp; When I run the following code it continues the loop and doesn't kick out once all results have cycled through.&amp;nbsp; Not sure if I've got something wrong or there is something else going on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I comment out the await line in the loop, the process kicks out of the loop as expected....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var queryResults = await table.QueryRelatedFeaturesAsync(feature); &lt;BR /&gt; foreach (var queryResult in queryResults.ToArray())&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;foreach (var f in queryResult)&lt;BR /&gt; {&lt;BR /&gt; var sft = (GeodatabaseFeatureTable)f.FeatureTable;&lt;BR /&gt; var id = (long)f.Attributes[sft.ObjectIdField];&lt;/P&gt;&lt;P&gt;f.Attributes["Comments"] = "Test";&lt;BR /&gt; await f.FeatureTable.UpdateFeatureAsync(f);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 19:45:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/update-related-table/m-p/536698#M6568</guid>
      <dc:creator>JerrySimmons_GISP</dc:creator>
      <dc:date>2017-11-14T19:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update related table</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/update-related-table/m-p/536699#M6569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This resolved the issue but seems you should be able to update the features individually instead all at one time...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var queryResults = await table.QueryRelatedFeaturesAsync(feature); &lt;BR /&gt; foreach (var queryResult in queryResults.ToArray())&lt;BR /&gt; {&lt;BR /&gt; List&amp;lt;Feature&amp;gt; _features = new List&amp;lt;Feature&amp;gt;();&lt;BR /&gt; foreach (var f in queryResult)&lt;BR /&gt; {&lt;BR /&gt;f.Attributes["Comments"] = "Test";&lt;BR /&gt;_features.Add(f);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; await queryResult.RelatedTable.UpdateFeaturesAsync(_features);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 20:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/update-related-table/m-p/536699#M6569</guid>
      <dc:creator>JerrySimmons_GISP</dc:creator>
      <dc:date>2017-11-14T20:42:26Z</dc:date>
    </item>
  </channel>
</rss>

