<?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 make a relationship query to an offline database? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536130#M6565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Similar to the sample, you have to get service metadata for the table. But instead of GetDetails, you use ServiceInfo. Also, similar to the sample when you query relationship, you will need to provide the feature id and relationship id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this..&lt;/P&gt;&lt;P&gt;var geodatabase = await Geodatabase.OpenAsync(filePath);&lt;/P&gt;&lt;P&gt;var layer = new FeatureLayer(geodatabase.GetFeatureTableById(0));&lt;/P&gt;&lt;P&gt;var table = (ArcGISFeatureTable)layer.FeatureTable;&lt;/P&gt;&lt;P&gt;var relationshipID = table.ServiceInfo.Relationships[0].ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var results = await table.QueryRelatedAsync(featureID, relationshipID);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Dec 2014 18:12:03 GMT</pubDate>
    <dc:creator>JenniferNery</dc:creator>
    <dc:date>2014-12-17T18:12:03Z</dc:date>
    <item>
      <title>How to make a relationship query to an offline database?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536127#M6562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a database replica for offline use. I would like to make a relationship query to the offline geodatabase. How can I do this?&lt;/P&gt;&lt;P&gt;I've found documentation on how to do a basic query to a table and it's very simple (just table.Query()). However, the QueryRelatedAsync method requires the RelationshipID. How is the ID aquired if the app is in offline mode and doesn't have access to the feature server? There doesn't seem to be any documentation on the offline relationship query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 11:44:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536127#M6562</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2014-12-15T11:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a relationship query to an offline database?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536128#M6563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can look at this SDK sample : &lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Editing/EditRelatedData.xaml.cs" title="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/master/src/Desktop/ArcGISRuntimeSDKDotNet_DesktopSamples/Samples/Editing/EditRelatedData.xaml.cs"&gt;arcgis-runtime-samples-dotnet/EditRelatedData.xaml.cs at master · Esri/arcgis-runtime-samples-dotnet · GitHub&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although sample use QueryTask (online), similar parameters can be used to access related data off ArcGISFeatureTable. Just note that when you generate the geodatabase, you must also request for the related table. &lt;A href="https://developers.arcgis.com/net/desktop/api-reference//html/M_Esri_ArcGISRuntime_Data_ArcGISFeatureTable_QueryRelatedAsync.htm" title="https://developers.arcgis.com/net/desktop/api-reference//html/M_Esri_ArcGISRuntime_Data_ArcGISFeatureTable_QueryRelatedAsync.htm"&gt;ArcGISFeatureTable.QueryRelatedAsync Method (Boolean, Int64)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 20:57:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536128#M6563</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2014-12-16T20:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a relationship query to an offline database?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536129#M6564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply, but this doesn't really answer the question. I looked at the sample and it uses the layers to get the relationship id. Also it uses ArcGISDynamicMapServiceLayer which I also don't have as I'm offline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have a .geodatabase and I need to query data from tables. I know I can get the tables from the gdb with lambda expressions easily, but again: &lt;STRONG&gt;how do I get the &lt;SPAN style="text-decoration: underline;"&gt;relationshipId&lt;/SPAN&gt; required in the QueryRelatedAsync method&lt;/STRONG&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 07:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536129#M6564</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2014-12-17T07:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a relationship query to an offline database?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536130#M6565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Similar to the sample, you have to get service metadata for the table. But instead of GetDetails, you use ServiceInfo. Also, similar to the sample when you query relationship, you will need to provide the feature id and relationship id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this..&lt;/P&gt;&lt;P&gt;var geodatabase = await Geodatabase.OpenAsync(filePath);&lt;/P&gt;&lt;P&gt;var layer = new FeatureLayer(geodatabase.GetFeatureTableById(0));&lt;/P&gt;&lt;P&gt;var table = (ArcGISFeatureTable)layer.FeatureTable;&lt;/P&gt;&lt;P&gt;var relationshipID = table.ServiceInfo.Relationships[0].ID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var results = await table.QueryRelatedAsync(featureID, relationshipID);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 18:12:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536130#M6565</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2014-12-17T18:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a relationship query to an offline database?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536131#M6566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So even when the table is an offline table, I must use the ServiceInfo...? It's a bit confusing since we don't have any services in offline mode.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Dec 2014 12:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-make-a-relationship-query-to-an-offline/m-p/536131#M6566</guid>
      <dc:creator>JuhoVainio</dc:creator>
      <dc:date>2014-12-19T12:52:16Z</dc:date>
    </item>
  </channel>
</rss>

