<?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 FindTask with more than 500 values in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/findtask-with-more-than-500-values/m-p/744467#M68875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to make a findTask that gives me all the features with this searchText:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;findParams.searchText = " ";&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is the map service is limited to 500 features per findTask, is there any way of asking the server for the information in another way or creating a loop that is able to ask for the features sequentially?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sadly I am not able to edit the map service so I can't change the limit of the answers that the findTask is sending me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PD: here you can find the code that retrieves the data&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp; findTask = new esri.tasks.FindTask("https://maps.cern.ch/ArcGIS/rest/services/General/loc/MapServer/");
&amp;nbsp; 

&amp;nbsp; findParams = new esri.tasks.FindParameters();
&amp;nbsp; findParams.returnGeometry = true;
&amp;nbsp; findParams.layerIds = [6,7,8,10,11,15,16,17,19];
&amp;nbsp; findParams.searchFields = ["NUMERO", "SIGLE", "SITE","TITLE","SPAT_NAME","SPAT_ACCL_NAME","LOCATION_EXPERT_NAME"];
&amp;nbsp; findParams.outSpatialReference = map.spatialReference;
&amp;nbsp; findParams.searchText = " ";
&amp;nbsp; findTask.execute(findParams,function (results) {
 //parse results and add to autocomplete widget
 dojo.forEach(results, function(value, index){
&amp;nbsp;&amp;nbsp; names.push(value.value);
 });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, function (error) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Error: " + error);
&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Apr 2013 09:02:26 GMT</pubDate>
    <dc:creator>IonPadilla</dc:creator>
    <dc:date>2013-04-08T09:02:26Z</dc:date>
    <item>
      <title>FindTask with more than 500 values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/findtask-with-more-than-500-values/m-p/744467#M68875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to make a findTask that gives me all the features with this searchText:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;findParams.searchText = " ";&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is the map service is limited to 500 features per findTask, is there any way of asking the server for the information in another way or creating a loop that is able to ask for the features sequentially?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sadly I am not able to edit the map service so I can't change the limit of the answers that the findTask is sending me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PD: here you can find the code that retrieves the data&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp; findTask = new esri.tasks.FindTask("https://maps.cern.ch/ArcGIS/rest/services/General/loc/MapServer/");
&amp;nbsp; 

&amp;nbsp; findParams = new esri.tasks.FindParameters();
&amp;nbsp; findParams.returnGeometry = true;
&amp;nbsp; findParams.layerIds = [6,7,8,10,11,15,16,17,19];
&amp;nbsp; findParams.searchFields = ["NUMERO", "SIGLE", "SITE","TITLE","SPAT_NAME","SPAT_ACCL_NAME","LOCATION_EXPERT_NAME"];
&amp;nbsp; findParams.outSpatialReference = map.spatialReference;
&amp;nbsp; findParams.searchText = " ";
&amp;nbsp; findTask.execute(findParams,function (results) {
 //parse results and add to autocomplete widget
 dojo.forEach(results, function(value, index){
&amp;nbsp;&amp;nbsp; names.push(value.value);
 });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, function (error) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert("Error: " + error);
&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2013 09:02:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/findtask-with-more-than-500-values/m-p/744467#M68875</guid>
      <dc:creator>IonPadilla</dc:creator>
      <dc:date>2013-04-08T09:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: FindTask with more than 500 values</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/findtask-with-more-than-500-values/m-p/744468#M68876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The best way would be to alter the 500 limit on the server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The other way if you have a ascending or descending primary key or OBJECTID you could write a loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Selecting the first 500 take the last id of them and start the next query with &amp;gt; or &amp;lt; id and so on until there are no more results. Not the best solution i think but practicable.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Apr 2013 07:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/findtask-with-more-than-500-values/m-p/744468#M68876</guid>
      <dc:creator>JanJeske</dc:creator>
      <dc:date>2013-04-09T07:05:57Z</dc:date>
    </item>
  </channel>
</rss>

