<?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: ArcGIS API for javascript - how to get records count of zipped shapefile in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814393#M6827</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; My suggestion is to start looking for a JS library for shapefiles. I know there where a couple of them years ago. Using one of them clientside you can read and create a featurelayer clientside and get past your feature limit issue. But this is a not something others will be able to provide help with as I have seen little to no discussion of this on esri forums for the last 10 or more years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Aug 2020 14:28:24 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2020-08-26T14:28:24Z</dc:date>
    <item>
      <title>ArcGIS API for javascript - how to get records count of zipped shapefile</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814392#M6826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;ESRI example code in&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-shapefile/index.html"&gt;Create a&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;FeatureLayer from a shapefile&lt;/A&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;adds zipped shapefile into map.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;This code uses&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN&gt; &lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/generate.htm"&gt;ArcGIS REST API Generate&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&amp;nbsp;to create the feature collection, but it&amp;nbsp;&lt;/SPAN&gt;is limited and can't create if total recors number is greater than 4000.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;So, I want to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c;"&gt;analyze&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the zipped shapefile&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;prior&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to generating features using Generate operation, in order to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;know the number of records, either total, or better - per layer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;My questios are:&lt;/P&gt;&lt;OL style="background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="background-color: #ffffff; border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;How can I add in this code a query to only get&amp;nbsp;the&amp;nbsp;total number of records (in the input zipped shapefile (in order to know apriory if it is greater than 4000)?&lt;/LI&gt;&lt;LI style="background-color: #ffffff; border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;How&amp;nbsp;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;can I add in this code a query to get the total number of records&amp;nbsp;per layer (I know the layer names, but maybe I could get the number of records per layer also without knowing apriory the layer names)?&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;I'll appreciate help,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Michael&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 12:56:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814392#M6826</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-08-26T12:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for javascript - how to get records count of zipped shapefile</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814393#M6827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; My suggestion is to start looking for a JS library for shapefiles. I know there where a couple of them years ago. Using one of them clientside you can read and create a featurelayer clientside and get past your feature limit issue. But this is a not something others will be able to provide help with as I have seen little to no discussion of this on esri forums for the last 10 or more years.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 14:28:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814393#M6827</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-08-26T14:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for javascript - how to get records count of zipped shapefile</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814394#M6828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;A href="https://community.esri.com/migrated-users/395287"&gt;Michael Lev&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;To process a zip file or uploaded file you will need to work with the server-side. Javascript will only be able to process if the server-side responds with data. JS libraries that can process zip files or uploaded files are executed on server usually as node libraries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is not a client-side javascript question, as that technology is restricted for security reasons by browsers in reading files from file system.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF for your scenario Generate returns a response, only that you cannot place the feature entirely as a layer – then you may be able to read and extract information from the response object to a generate call and take necessary actions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt; here, you are asking ArcGIS REST API running on server (probably using python with pyshp(&lt;A href="https://pypi.org/project/pyshp/"&gt;https://pypi.org/project/pyshp/&lt;/A&gt;) like libraries to process shape) to process the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2020 13:11:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814394#M6828</guid>
      <dc:creator>HarishPalaniappan</dc:creator>
      <dc:date>2020-09-04T13:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS API for javascript - how to get records count of zipped shapefile</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814395#M6829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So there is no convenient way to get total records count of zipped shapefile before passing it to arcgis rest ap generate".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I always pass the zip to "generate", and I'm using "generate" returned error message to inform the user that this zip has more than 4000 records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2020 06:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/arcgis-api-for-javascript-how-to-get-records-count/m-p/814395#M6829</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-09-10T06:49:45Z</dc:date>
    </item>
  </channel>
</rss>

