<?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: Using related records offline in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592976#M5151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have found some similar example, But still couldn't figure out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;for info: AGSMapServiceTableInfo in weakSelf.gdbTask.featureServiceInfo.tableInfos {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var url: NSURL = weakSelf.gdbTask.URL.URLByAppendingPathComponent("\(info.tableId)")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fl: AGSFeatureLayer = AGSFeatureLayer.featureServiceLayerWithURL(url, mode: AGSFeatureLayerModeOnDemand)&lt;/P&gt;&lt;P&gt;weakSelf.mapView.addMapLayer(fl, withName: info.name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fl.outFields = ["*"]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fl.delegate = weakSelf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fl.queryDelegate = weakSelf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fl.editingDelegate = weakSelf&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;With this piece of code i though i can convert it AGSFeatureLayer so i can use &lt;STRONG&gt;&lt;SPAN class="s1"&gt;queryRelatedFeatures&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please help how can i use the related records with offline sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3289"&gt;Divesh Goyal&lt;/A&gt;​, &lt;A href="https://community.esri.com/migrated-users/35592"&gt;Suganya Baskaran&lt;/A&gt;​ &lt;A href="https://community.esri.com/migrated-users/36939"&gt;Yue Wu&lt;/A&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>Fri, 17 Jun 2016 10:06:46 GMT</pubDate>
    <dc:creator>JohnHery</dc:creator>
    <dc:date>2016-06-17T10:06:46Z</dc:date>
    <item>
      <title>Using related records offline</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592974#M5149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is there any way to use "Related Record Samples" with "Offline Feature Editing" ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to implement but so far did not been able to success.&amp;nbsp; The reason is all the data is been loaded as &lt;SPAN class="s1"&gt;AGSFeatureTableLayer &lt;/SPAN&gt;in Offline sample, and the related records works as AGSFeatureLayer in Swift, is there any way to convert the data from Table data to AGSFeatureLayer ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jun 2016 07:34:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592974#M5149</guid>
      <dc:creator>JohnHery</dc:creator>
      <dc:date>2016-06-08T07:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using related records offline</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592975#M5150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No answer ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jun 2016 09:00:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592975#M5150</guid>
      <dc:creator>JohnHery</dc:creator>
      <dc:date>2016-06-09T09:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using related records offline</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592976#M5151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have found some similar example, But still couldn't figure out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;for info: AGSMapServiceTableInfo in weakSelf.gdbTask.featureServiceInfo.tableInfos {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var url: NSURL = weakSelf.gdbTask.URL.URLByAppendingPathComponent("\(info.tableId)")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var fl: AGSFeatureLayer = AGSFeatureLayer.featureServiceLayerWithURL(url, mode: AGSFeatureLayerModeOnDemand)&lt;/P&gt;&lt;P&gt;weakSelf.mapView.addMapLayer(fl, withName: info.name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fl.outFields = ["*"]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fl.delegate = weakSelf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fl.queryDelegate = weakSelf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fl.editingDelegate = weakSelf&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;With this piece of code i though i can convert it AGSFeatureLayer so i can use &lt;STRONG&gt;&lt;SPAN class="s1"&gt;queryRelatedFeatures&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;please help how can i use the related records with offline sample.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3289"&gt;Divesh Goyal&lt;/A&gt;​, &lt;A href="https://community.esri.com/migrated-users/35592"&gt;Suganya Baskaran&lt;/A&gt;​ &lt;A href="https://community.esri.com/migrated-users/36939"&gt;Yue Wu&lt;/A&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>Fri, 17 Jun 2016 10:06:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592976#M5151</guid>
      <dc:creator>JohnHery</dc:creator>
      <dc:date>2016-06-17T10:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using related records offline</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592977#M5152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order to use Offline function to sync tables, you need to make sure that your relatedTable is also enable the sync function from ArcGIS Server side, otherwise it is not possible to sync or query those tables in offline mode. &lt;A href="http://server.arcgis.com/en/server/10.3/publish-services/windows/prepare-data-for-offline-use.htm" title="http://server.arcgis.com/en/server/10.3/publish-services/windows/prepare-data-for-offline-use.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Prepare data for offline use—Documentation (10.3 and 10.3.1) | ArcGIS for Server&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the data schema is correct, you need to make sure when you download the offline gdb to loop through all the table's iD&lt;/P&gt;&lt;P&gt;with an ArcGIS Server map or feature service by checking this Class &lt;A href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_map_service_table_info.html#ade28f49ac0a5cc3ab9c4ecfb3ffd8e57" title="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_map_service_table_info.html#ade28f49ac0a5cc3ab9c4ecfb3ffd8e57" rel="nofollow noopener noreferrer" target="_blank"&gt;10.2.5: AGSMapServiceTableInfo Class Reference&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a snippet code that you generate the gdb generate parameters:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGDBGenerateParameters* syncParams = [[AGSGDBGenerateParameters alloc] initWithExtent:&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;.mapView.visibleAreaEnvelope layerIDs:tableIds];&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; syncParams.syncModel = AGSGDBSyncModelPerLayer;&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; syncParams.outSpatialReference = [AGSSpatialReference spatialReferenceWithWKID:&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;102100&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;];&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; syncParams.queries = [&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;self&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; createLayerQueries];&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use AGSGDBLayerQuery to control the download gdb with certain layers and tables, you can take a look about this class &lt;A href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_g_d_b_layer_query.html" title="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_g_d_b_layer_query.html" rel="nofollow noopener noreferrer" target="_blank"&gt;10.2.5: AGSGDBLayerQuery Class Reference&lt;/A&gt;, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="s1"&gt;&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;- (NSArray*)createLayerQueries&lt;/SPAN&gt;
&lt;SPAN class="s1"&gt;{&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;// RelatedTable Query&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="s1"&gt;NSString* relatedTableQueryWhere = [NSString stringWithFormat:&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;@"some generic query syntax"&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;];&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGDBLayerQuery* relatedTableQuery = [[AGSGDBLayerQuery alloc] init];&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customerQuery.layerID = kCustomerServiceIndex;&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customerQuery.option = AGSGDBQueryOptionUseFilter;&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customerQuery.useGeometry = &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;NO&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; customerQuery.whereClause = relatedTableQueryWhere;&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return query;&lt;/SPAN&gt;
&lt;SPAN class="s2"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:28:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592977#M5152</guid>
      <dc:creator>YueWu1</dc:creator>
      <dc:date>2021-12-12T01:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using related records offline</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592978#M5153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Yue Wu, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally Someone answered. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I m developing my application in swift, Do you have the code in swift ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have enabled the Sync in Arcgis Server. Even i have updated to 10.3.1. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my issue starts at when i try to display related records like in the sample. It needs AGSFeatureLayer .&lt;SPAN style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #3d3d3d;"&gt;&lt;SPAN class="s1" style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;queryRelatedFeatures&lt;/SPAN&gt;&lt;/SPAN&gt; function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to cast the data from AGSFeatureTableLayer ?&amp;nbsp; As your sample is all i need but i just need to run in &lt;STRONG&gt;Offline Editing Sample&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if you share a sample code with working &lt;STRONG&gt;Offline Editing sample&lt;/STRONG&gt; will do. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2016 11:07:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592978#M5153</guid>
      <dc:creator>JohnHery</dc:creator>
      <dc:date>2016-06-20T11:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using related records offline</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592979#M5154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use a local geodatabase, you display features using a AGSFeatureTableLayer. This AGSFeatureTableLayer works with AGSFeatureTable which corresponds to individual tables &amp;amp; layers in the geodatabase. If you downcast from AGSFeatureTable to AGSGDBFeatureTable, you'll notice that there is a &lt;A href="https://developers.arcgis.com/ios/api-reference/interface_a_g_s_g_d_b_feature_table.html#a6aaa4607351b853b7d3cee3098ce0688"&gt;method&lt;/A&gt; `queryRelatedFeaturesWithParameters()` which allows you to get related records from another layer or table. This is equivalent to the online version `AGSFeatureLayer.queryRelatedFeatures()`.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, for the related query to work offline, you must ensure that the local geodatabase does indeed include the related data. You do this by setting up the AGSGDBGenerateParameters correctly. The param contains an array of AGSGDBLayerQuery objects which decides what data to include for each layer/table in the geodatabase. If you have a layer A related to layer B, then you must include an AGSGDBLayerQuery object for each layer so that their data is included in the generated geodatabase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 16:38:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/using-related-records-offline/m-p/592979#M5154</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2016-07-08T16:38:00Z</dc:date>
    </item>
  </channel>
</rss>

