<?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: Is there an example on how to access related record groups? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633883#M59221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert for taking a look at it. I'm actually using&amp;nbsp;&lt;EM&gt;executeRelationshipQuery&lt;/EM&gt; on a queryTask but even then is the example really feeding multiple ObjectIDs into the query? &amp;nbsp; I'm looking at line 151:&amp;nbsp;relatedQuery.objectIds = [graphicAttributes.objectid];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2018 10:32:00 GMT</pubDate>
    <dc:creator>AnikaHirt</dc:creator>
    <dc:date>2018-03-07T10:32:00Z</dc:date>
    <item>
      <title>Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633881#M59219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am making a relationship query with multiple Objects IDs and receiving multiple related record groups. I can access the Object IDs for the related records but I don't know how to access the actual records for that ID. Is there an example on how to access&amp;nbsp;related record groups and its records?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 11:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633881#M59219</guid>
      <dc:creator>AnikaHirt</dc:creator>
      <dc:date>2018-03-06T11:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633882#M59220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Have you seen this sample?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jssamples/ed_relatededits.html" title="https://developers.arcgis.com/javascript/3/jssamples/ed_relatededits.html"&gt;Query and edit related records | ArcGIS API for JavaScript 3.23&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2018 14:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633882#M59220</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-03-06T14:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633883#M59221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert for taking a look at it. I'm actually using&amp;nbsp;&lt;EM&gt;executeRelationshipQuery&lt;/EM&gt; on a queryTask but even then is the example really feeding multiple ObjectIDs into the query? &amp;nbsp; I'm looking at line 151:&amp;nbsp;relatedQuery.objectIds = [graphicAttributes.objectid];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 10:32:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633883#M59221</guid>
      <dc:creator>AnikaHirt</dc:creator>
      <dc:date>2018-03-07T10:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633884#M59222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; No that sample is just querying one ObjectId. But Querying multiple is supported you just use the OID i=as the array key when going through the returned results (as the sample does show).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 15:25:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633884#M59222</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-03-07T15:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633885#M59223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sure, I can query for multiple but I need an example how I can actually access the result. I am able to get the keys but not the actual related record group records. So I was hoping to see if it is done somewhere to get a better understanding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:28:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633885#M59223</guid>
      <dc:creator>AnikaHirt</dc:creator>
      <dc:date>2018-03-07T17:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633886#M59224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anika,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The sample I provided show how to get the results from the related query based on the OID. So if you have queried for multiple OIDs then you just use one of those OIDs&amp;nbsp; to get the related records from the results.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;incidentLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryRelatedFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;relatedQuery&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;relatedRecords&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fset &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; relatedRecords&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;graphicAttributes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectid&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So in line 2 above the results for one specific OID is returned based on using that OID as the key in the relatedRecords array from the relates query. The fset is an array of feature that are related to the OID.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633886#M59224</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an example on how to access related record groups?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633887#M59225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the&amp;nbsp;&lt;EM&gt;executeRelationShipQuery&lt;/EM&gt; on a &lt;EM&gt;queryTask&lt;/EM&gt;&amp;nbsp; an object with the related record groups is returned. The OIDs&amp;nbsp;can be used as a key to then get to the object Ids (or whatever is needed) within the related record groups. This is how&amp;nbsp;I did it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;var queryTask = new QueryTask("http//...");&lt;/CODE&gt;&lt;CODE&gt;&lt;SPAN class="" style="color: #0077aa; border: 0px; font-weight: inherit; font-size: 14px;"&gt;
var&lt;/SPAN&gt; query &lt;SPAN class="" style="color: #a67f59; background-color: rgba(255, 255, 255, 0.498039); border: 0px; font-weight: inherit; font-size: 14px;"&gt;=&lt;/SPAN&gt; new RelationshipQuery(); 
query.outfields&lt;/CODE&gt;&lt;LI&gt;&lt;CODE&gt;; 
query.objectids [queryIds]; // multiple Ids e.g. [105,106,233]
query.relationshipId = 2;

queryTask.executeRelationshipQuery(query, function(realtedRecordsGroups)){
&amp;nbsp;&amp;nbsp;&amp;nbsp;allRelatedRecordsIds = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp;for(var obid in relatedRecordsGroups){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;allRelatedRecordsGroups.push(results.features&lt;I&gt;.attributes.OBJECTID);
&amp;nbsp;&amp;nbsp;&amp;nbsp;}
});&lt;/I&gt;&lt;/CODE&gt;&lt;I&gt;&lt;/I&gt;&lt;/LI&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:58:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-an-example-on-how-to-access-related/m-p/633887#M59225</guid>
      <dc:creator>AnikaHirt</dc:creator>
      <dc:date>2021-12-12T02:58:09Z</dc:date>
    </item>
  </channel>
</rss>

