<?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 query related table in offline geodatabase in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804297#M1410</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply Hannah. I studied that sample. I was unable to get it to work with data stored in a .geodatabase file. Is this perhaps a bug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have since moved on and decided to completely skip using the relationship class functionality and instead instantiate my related table as an ordinary GeodatabaseFeatureTable, build the &lt;EM&gt;Query &lt;/EM&gt;with javascript to retrieve the correct records for a selected feature&lt;EM&gt;,&lt;/EM&gt; and then listen for &lt;EM&gt;onQueryFeaturesStatusChanged&lt;/EM&gt; on the table. That works, and I'm not sure whether using the relationship class functionality would actually have any advantages (?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Mar 2016 04:24:36 GMT</pubDate>
    <dc:creator>TobiasFimpel1</dc:creator>
    <dc:date>2016-03-10T04:24:36Z</dc:date>
    <item>
      <title>how to query related table in offline geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804295#M1408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I query a related (non-spatial) table in an offline geodatabase the relatedResults object is not what I would expect. Can somebody help me understand what I'm doing wrong in the below code? Or perhaps post a code sample of how to query related records in an offline geodatabase? Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is what I'm doing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;//a runtime geodatabase with a points layer an a related table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geodatabase {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: gdb2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path:gdbPath2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// set up the query parameters. I know that related records exist for a point feature with ObjectID = 2, I verified by converting the r&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;untime gdb to file geodatabase with ArcMap&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; QueryRelatedRecordsParameters {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: relatedQueryParam&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["OBJECTID"]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relationshipId: 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objectIds: ['2']&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; line-height: 1.5;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// then I execute queryRelated&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;SPAN style="font-style: italic; color: #000000;"&gt;localPointsTable&lt;/SPAN&gt;.queryRelated(&lt;SPAN style="font-style: italic; color: #000000;"&gt;relatedQueryParam&lt;/SPAN&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;// then &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10.6667px; line-height: 16px;"&gt;onQueryRelatedStatusChanged &lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt; line-height: 1.5;"&gt;I access the relatedResults&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;GeodatabaseFeatureTable {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: localPointsTable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geodatabase: gdb2.valid ? gdb2 : null&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureServiceLayerId: 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onQueryRelatedStatusChanged: {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(queryRelatedStatus) // returns '1' (QueryRelatedStatusInProgress) , then '2' (QueryRelatedStatusCompleted)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(relatedResults) // this returns '[object Object]'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(relatedResults.json) // this returns 'undefined'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.6667px; line-height: 16px; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE style="margin-top: 0px; margin-bottom: 0px;"&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 04:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804295#M1408</guid>
      <dc:creator>TobiasFimpel1</dc:creator>
      <dc:date>2016-02-19T04:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to query related table in offline geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804296#M1409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a&lt;EM&gt; Query Related Records&lt;/EM&gt; sample in AppStudio for a feature service, but it should point you in the right direction &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use the samples in AppStudio, double-click on&lt;STRONG&gt; New App&lt;/STRONG&gt;, select the &lt;STRONG&gt;Samples&lt;/STRONG&gt; category and scroll down until you find the &lt;EM&gt;Query Related Records&lt;/EM&gt; sample project. &lt;/P&gt;&lt;P&gt;Enter a project title and click OK.&lt;/P&gt;&lt;P&gt;Now open your new project in Qt Creator to look at the source code &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Hannah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 03:11:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804296#M1409</guid>
      <dc:creator>HannahFerrier</dc:creator>
      <dc:date>2016-03-10T03:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to query related table in offline geodatabase</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804297#M1410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply Hannah. I studied that sample. I was unable to get it to work with data stored in a .geodatabase file. Is this perhaps a bug?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have since moved on and decided to completely skip using the relationship class functionality and instead instantiate my related table as an ordinary GeodatabaseFeatureTable, build the &lt;EM&gt;Query &lt;/EM&gt;with javascript to retrieve the correct records for a selected feature&lt;EM&gt;,&lt;/EM&gt; and then listen for &lt;EM&gt;onQueryFeaturesStatusChanged&lt;/EM&gt; on the table. That works, and I'm not sure whether using the relationship class functionality would actually have any advantages (?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tobias&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 04:24:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/how-to-query-related-table-in-offline-geodatabase/m-p/804297#M1410</guid>
      <dc:creator>TobiasFimpel1</dc:creator>
      <dc:date>2016-03-10T04:24:36Z</dc:date>
    </item>
  </channel>
</rss>

