<?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: in querytask, returnIdsOnly = true doesn't work in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327835#M30269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My fault, I confussed the REST and JS API. &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt; I thought you could add the same properties to the query like parameters in REST.&amp;nbsp; executeForIds worked fine!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the quick replies!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2010 06:05:20 GMT</pubDate>
    <dc:creator>joanvallespir</dc:creator>
    <dc:date>2010-12-10T06:05:20Z</dc:date>
    <item>
      <title>in querytask, returnIdsOnly = true doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327832#M30266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm experiencing an issue that could be a bug.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using API 2.1 against an ArcGIs Server 10. I'd like to query a feature service and get the IDs resulting from a selection. I'm setting returnIdsOnly&amp;nbsp; parameter to true to retrieve an array with Ids but for some reason when I use it I get all the fields from the service as a featureset. I checked the resulting url, and (for my surprise) it doesn't contain the returnIdsOnly parameter :confused:, so it's not a problem related to AGS, so I guess it is a bug from the JS API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the extract of code I'm using, and commented the workaround I'm using for the moment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var QueryTask1 = new esri.tasks.QueryTask("http://server/arcgis/rest/services/../../FeatureServer/2");
var Query1 = new esri.tasks.Query();
Query1.where = "UPPER(field) like UPPER('%sometext%')";
Query1.returnIdsOnly = true;
//Query1.outFields = ['OBJECTID'];
QueryTask1.execute(Query1, showmeRecords);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any similar experience?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 12:28:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327832#M30266</guid>
      <dc:creator>joanvallespir</dc:creator>
      <dc:date>2010-12-09T12:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: in querytask, returnIdsOnly = true doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327833#M30267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I may be missing something, however the documentation does not show returnIdsOnly as a property of a query object. The workaround you have will probably be the best way available, though I did notice the executeForIds method that could work. There is little documentation on this, so it may or may not work like the execute method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Class: Query&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/query.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/query.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 15:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327833#M30267</guid>
      <dc:creator>TonyContreras</dc:creator>
      <dc:date>2010-12-09T15:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: in querytask, returnIdsOnly = true doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327834#M30268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you're confusing the REST API with the JavaScript API. If you're using JS, use &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/querytask.htm#executeForIds"&gt;executeForIds()&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 19:46:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327834#M30268</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2010-12-09T19:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: in querytask, returnIdsOnly = true doesn't work</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327835#M30269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My fault, I confussed the REST and JS API. &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt; I thought you could add the same properties to the query like parameters in REST.&amp;nbsp; executeForIds worked fine!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the quick replies!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 06:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/in-querytask-returnidsonly-true-doesn-t-work/m-p/327835#M30269</guid>
      <dc:creator>joanvallespir</dc:creator>
      <dc:date>2010-12-10T06:05:20Z</dc:date>
    </item>
  </channel>
</rss>

