<?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: How to use AGSRelatedQueryParameters with AGSRelationshipInfo? in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746834#M6729</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on what &lt;STRONG&gt;data.graphic&lt;/STRONG&gt; is, you may need an additional step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;data.graphic&lt;/STRONG&gt; is an &lt;STRONG&gt;AGSArcGISFeature&lt;/STRONG&gt;&amp;nbsp;instance which you created, added, and then&amp;nbsp;stored with &lt;STRONG&gt;applyEdits&lt;/STRONG&gt; (as opposed to an object you got back from a query), then before you do further operations on it, you should call &lt;STRONG&gt;AGSArcGISFeature.refreshObjectID()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In more detail:&amp;nbsp;For any feature you get with a query, it'll already have the data store's ID populated, but&amp;nbsp;if you create the feature, there is no ID until it's stored (when working against a local geodatabse/shapefile, that happens when you call addFeature, or when working against an AGSServiceFeatureTable, when you call applyEdits). Since&amp;nbsp;it's bad for us&amp;nbsp;to assume we can&amp;nbsp;update your Objective-C&amp;nbsp;objects&amp;nbsp;without telling you, we don't set the ID automatically as part of the add/apply operation, so if you want to continue using the same reference to the &lt;STRONG&gt;AGSArcGISFeature&lt;/STRONG&gt; for future writes (e.g adding attachments or relating records), call &lt;STRONG&gt;AGSArcGISFeature.refreshObjectID()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case above,&amp;nbsp;try calling refreshObjectID() on data.graphic before querying for related features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2018 18:37:58 GMT</pubDate>
    <dc:creator>Nicholas-Furness</dc:creator>
    <dc:date>2018-06-18T18:37:58Z</dc:date>
    <item>
      <title>How to use AGSRelatedQueryParameters with AGSRelationshipInfo?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746831#M6726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to know how to use 'AGSRelatedQueryParameters' with 'AGSRelationshipInfo'. Give me an example. I guess '&lt;SPAN&gt;AGSRelatedQueryParameters&lt;/SPAN&gt;' is the replacement for 'AGSRelationshipQuery'. Am i right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 14:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746831#M6726</guid>
      <dc:creator>MuruganandhamKuppan1</dc:creator>
      <dc:date>2018-05-29T14:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AGSRelatedQueryParameters with AGSRelationshipInfo?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746832#M6727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/314085"&gt;Muruganandham Kuppan&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can find a sample here:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/ea83939a56101ef82f17ff6eecb1b2faa716d720/arcgis-ios-sdk-samples/Features/Add%20delete%20related%20features/RelatedFeaturesViewController.swift" title="https://github.com/Esri/arcgis-runtime-samples-ios/blob/ea83939a56101ef82f17ff6eecb1b2faa716d720/arcgis-ios-sdk-samples/Features/Add%20delete%20related%20features/RelatedFeaturesViewController.swift"&gt;arcgis-runtime-samples-ios/RelatedFeaturesViewController.swift&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 May 2018 15:46:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746832#M6727</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2018-05-29T15:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AGSRelatedQueryParameters with AGSRelationshipInfo?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746833#M6728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/2201"&gt;Nicholas Furness&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns an empty array. But the `AGSRelationshipInfo`&amp;nbsp; logs the related table id correctly. FYI, i can get the related features in&amp;nbsp; iOS Runtime SDK v 10.2.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P class=""&gt;AGSServiceFeatureTable&lt;SPAN class=""&gt; * featureTable = (&lt;/SPAN&gt;AGSServiceFeatureTable&lt;SPAN class=""&gt;*)data.&lt;/SPAN&gt;graphic&lt;SPAN class=""&gt;.&lt;/SPAN&gt;featureTable&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;AGSRelationshipInfo&lt;SPAN class=""&gt; * rInfo = featureTable.&lt;/SPAN&gt;layerInfo&lt;SPAN class=""&gt;.&lt;/SPAN&gt;relationshipInfos&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN class=""&gt;firstObject&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;AGSRelatedQueryParameters&lt;SPAN class=""&gt; * find = [&lt;/SPAN&gt;AGSRelatedQueryParameters&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;relatedQueryParametersWithRelationshipInfo&lt;/SPAN&gt;&lt;SPAN class=""&gt;:rInfo];&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;find.&lt;/SPAN&gt;&lt;SPAN class=""&gt;orderByFields&lt;/SPAN&gt;&lt;SPAN class=""&gt; = &lt;/SPAN&gt;&lt;SPAN class=""&gt;@[&lt;/SPAN&gt;&lt;SPAN class=""&gt;[[&lt;/SPAN&gt;&lt;SPAN class=""&gt;AGSOrderBy&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;alloc&lt;/SPAN&gt;&lt;SPAN class=""&gt;] &lt;/SPAN&gt;initWithFieldName&lt;SPAN class=""&gt;:rInfo.&lt;/SPAN&gt;&lt;SPAN class=""&gt;keyField&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;sortOrder&lt;SPAN class=""&gt;:&lt;/SPAN&gt;AGSSortOrderDescending&lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;SPAN class=""&gt;]&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;NSString&lt;/SPAN&gt; * whereClause = [&lt;SPAN class=""&gt;NSString&lt;/SPAN&gt; &lt;SPAN class=""&gt;stringWithFormat&lt;/SPAN&gt;:&lt;SPAN class=""&gt;@"""%@ = '%lld'"""&lt;/SPAN&gt;,rInfo.&lt;SPAN class=""&gt;keyField&lt;/SPAN&gt;,data.&lt;SPAN class=""&gt;objectID&lt;/SPAN&gt;];&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[find &lt;SPAN class=""&gt;setWhereClause&lt;/SPAN&gt;:whereClause];&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;[featureTable &lt;SPAN class=""&gt;queryRelatedFeaturesForFeature&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;SPAN class=""&gt;AGSArcGISFeature&lt;/SPAN&gt;*)data.&lt;SPAN class=""&gt;graphic&lt;/SPAN&gt; &lt;SPAN class=""&gt;parameters&lt;/SPAN&gt;:find &lt;SPAN class=""&gt;completion&lt;/SPAN&gt;:^(&lt;SPAN class=""&gt;NSArray&lt;/SPAN&gt;&amp;lt;&lt;SPAN class=""&gt;AGSRelatedFeatureQueryResult&lt;/SPAN&gt; *&amp;gt; * &lt;SPAN class=""&gt;_Nullable&lt;/SPAN&gt; results, &lt;SPAN class=""&gt;NSError&lt;/SPAN&gt; * &lt;SPAN class=""&gt;_Nullable&lt;/SPAN&gt; error) {&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;if&lt;/SPAN&gt;(error)&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;{&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;else&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;{&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class=""&gt;NSLog&lt;/SPAN&gt;(&lt;SPAN class=""&gt;@"result-assets :: %@"&lt;/SPAN&gt;,results);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;}];&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Did i missed any thing here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:55:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746833#M6728</guid>
      <dc:creator>MuruganandhamKuppan1</dc:creator>
      <dc:date>2018-06-13T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AGSRelatedQueryParameters with AGSRelationshipInfo?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746834#M6729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Depending on what &lt;STRONG&gt;data.graphic&lt;/STRONG&gt; is, you may need an additional step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;data.graphic&lt;/STRONG&gt; is an &lt;STRONG&gt;AGSArcGISFeature&lt;/STRONG&gt;&amp;nbsp;instance which you created, added, and then&amp;nbsp;stored with &lt;STRONG&gt;applyEdits&lt;/STRONG&gt; (as opposed to an object you got back from a query), then before you do further operations on it, you should call &lt;STRONG&gt;AGSArcGISFeature.refreshObjectID()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In more detail:&amp;nbsp;For any feature you get with a query, it'll already have the data store's ID populated, but&amp;nbsp;if you create the feature, there is no ID until it's stored (when working against a local geodatabse/shapefile, that happens when you call addFeature, or when working against an AGSServiceFeatureTable, when you call applyEdits). Since&amp;nbsp;it's bad for us&amp;nbsp;to assume we can&amp;nbsp;update your Objective-C&amp;nbsp;objects&amp;nbsp;without telling you, we don't set the ID automatically as part of the add/apply operation, so if you want to continue using the same reference to the &lt;STRONG&gt;AGSArcGISFeature&lt;/STRONG&gt; for future writes (e.g adding attachments or relating records), call &lt;STRONG&gt;AGSArcGISFeature.refreshObjectID()&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case above,&amp;nbsp;try calling refreshObjectID() on data.graphic before querying for related features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nick.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2018 18:37:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746834#M6729</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2018-06-18T18:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AGSRelatedQueryParameters with AGSRelationshipInfo?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746835#M6730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, your reply worked for me. This is regarding listing related features. I have followed the following class&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/ea83939a56101ef82f17ff6eecb1b2faa716d720/arcgis-ios-sdk-samples/Features/List%20related%20features/ListRelatedFeaturesVC.swift" title="https://github.com/Esri/arcgis-runtime-samples-ios/blob/ea83939a56101ef82f17ff6eecb1b2faa716d720/arcgis-ios-sdk-samples/Features/List%20related%20features/ListRelatedFeaturesVC.swift"&gt;arcgis-runtime-samples-ios/ListRelatedFeaturesVC.swift at ea83939a56101ef82f17ff6eecb1b2faa716d720 · Esri/arcgis-runtime…&lt;/A&gt;&amp;nbsp; to fetch the related features. I tried to add related table in mapview as like in example. i got the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt; ArcGIS Runtime Error Ocurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error:&amp;nbsp; Error Domain=com.esri.arcgis.runtime.error Code=24 "Object already owned." UserInfo={NSLocalizedFailureReason=Already owned., NSLocalizedDescription=Object already owned., Additional Message=Already owned.}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I didn't get any clear idea about this. How can i add related table object to map.tables.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:12:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746835#M6730</guid>
      <dc:creator>MuruganandhamKuppan1</dc:creator>
      <dc:date>2018-06-26T11:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use AGSRelatedQueryParameters with AGSRelationshipInfo?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746836#M6731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's really hard to determine without more info or sample code, but in general that error means that something else is already tied to that table. The table&amp;nbsp;may already be part of the map.tables collection or&amp;nbsp;a layer in your map might be&amp;nbsp;using it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still really need to duplicate the layer, you could call &lt;STRONG&gt;copy()&lt;/STRONG&gt; on it and add that reference to the map but I'd suggest you double-check&amp;nbsp;that you're not unwittingly duplicating things.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 15:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/how-to-use-agsrelatedqueryparameters-with/m-p/746836#M6731</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2018-06-26T15:44:52Z</dc:date>
    </item>
  </channel>
</rss>

