<?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 queryIds method return obj in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queryids-method-return-obj/m-p/59210#M5211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The API docs say the queryIds method returns a list of ObjectIDs. Is that a typo, or does the method really return a list of ObjectIDs?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the docs are truly correct, why on earth would we ever want to get a result of ObjectIDs? What we would want returned is a FeatureSet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone verify if this is correct or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#queryids"&gt;https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#queryids&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Oct 2013 21:02:53 GMT</pubDate>
    <dc:creator>BrianBehling</dc:creator>
    <dc:date>2013-10-01T21:02:53Z</dc:date>
    <item>
      <title>queryIds method return obj</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queryids-method-return-obj/m-p/59210#M5211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The API docs say the queryIds method returns a list of ObjectIDs. Is that a typo, or does the method really return a list of ObjectIDs?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the docs are truly correct, why on earth would we ever want to get a result of ObjectIDs? What we would want returned is a FeatureSet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone verify if this is correct or not?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#queryids"&gt;https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#queryids&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 21:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queryids-method-return-obj/m-p/59210#M5211</guid>
      <dc:creator>BrianBehling</dc:creator>
      <dc:date>2013-10-01T21:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: queryIds method return obj</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queryids-method-return-obj/m-p/59211#M5212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What the doc says is correct. It is useful when you need to query the related records for some features, but no need to get those feature details. Here is the code snippet from ESRI document. Consider to replace [graphicAttributes.OBJECTID] in relatedQuery.objectIds = [graphicAttributes.OBJECTID]; with the objectIds returned from the queryIds method call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require([
&amp;nbsp; "esri/layers/FeatureLayer", "esri/tasks/RelationshipQuery", "dojo/_base/connect", ... 
], function(FeatureLayer, RelationshipQuery, connect, ... ) {
&amp;nbsp; var featureLayer = new FeatureLayer( ... );
&amp;nbsp; var relatedQuery = new RelationshipQuery();
&amp;nbsp; relatedQuery.outFields = ["AGREE_WITH_INCIDENT"];
&amp;nbsp; relatedQuery.relationshipId = 1;
&amp;nbsp; 
&amp;nbsp; //query for the features related to the "clicked" feature
&amp;nbsp; connect.connect(featureLayer, "onClick", function(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; graphicAttributes = evt.graphic.attributes;
&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.objectIds = [graphicAttributes.OBJECTID];
&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.queryRelatedFeatures(relatedQuery,relatedRecords);
&amp;nbsp; }
&amp;nbsp; ...
});&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:14:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/queryids-method-return-obj/m-p/59211#M5212</guid>
      <dc:creator>JasonZou</dc:creator>
      <dc:date>2021-12-10T22:14:46Z</dc:date>
    </item>
  </channel>
</rss>

