<?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: How to Query a flat table in JavaScript API in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460046#M42518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried the query using the fields aliases i.e. "Field Name", "Table Name" etc? &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Aug 2016 12:17:04 GMT</pubDate>
    <dc:creator>FC_Basson</dc:creator>
    <dc:date>2016-08-22T12:17:04Z</dc:date>
    <item>
      <title>How to Query a flat table in JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460045#M42517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to query a flat table present in SQLdatabase from JavaScript API. I have published the map service including the flat table and got the REST URL. When i query the table, i am not able to see any field attributes or values. Below is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var queries = []; &lt;BR /&gt;&lt;SPAN&gt; var queryTask = new QueryTask("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsampleserver3.arcgisonline.com%2FArcGIS%2Frest%2Fservices%2FBloomfieldHillsMichigan%2FParcels%2FMapServer%2F3" rel="nofollow" target="_blank"&gt;https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer/3&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;BR /&gt; var query = new Query();&lt;BR /&gt; query.where = "OBJECTID = 4";&lt;BR /&gt; query.outFields = ["TABLENAME", "FIELDNAME", "VALUEINFO"];&lt;BR /&gt; query.returnGeometry = true;&lt;BR /&gt; queries.push(queryTask.execute(query));&lt;BR /&gt; var iPromises = new all(queries);&lt;BR /&gt; iPromises.then(lang.hitch(this, function (r) { &lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; r.length // coming length as One but not able to see field values&lt;/SPAN&gt;&lt;BR /&gt; } &lt;BR /&gt; }));&lt;/P&gt;&lt;P&gt;Also find screen-shot for the same:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/217233_tableDetails.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Any idea.. how to get the field values.???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Shaikh Rizuan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460045#M42517</guid>
      <dc:creator>ShaikhRizuan</dc:creator>
      <dc:date>2016-08-22T12:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Query a flat table in JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460046#M42518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried the query using the fields aliases i.e. "Field Name", "Table Name" etc? &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:17:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460046#M42518</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-08-22T12:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to Query a flat table in JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460047#M42519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would just query &lt;STRONG&gt;WHERE &amp;nbsp;1=1&lt;/STRONG&gt; &amp;nbsp;I don't see an Object ID of 4 in the data and set the OutFields to be &lt;STRONG&gt;["*"]&lt;/STRONG&gt;. &lt;BR /&gt;That should give you some results to play with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer/3/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=1%3D1&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=true&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html"&gt;REST QUERY&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:38:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460047#M42519</guid>
      <dc:creator>Drew</dc:creator>
      <dc:date>2016-08-22T12:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to Query a flat table in JavaScript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460048#M42520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its working, When i tried with different field names.. other than ObjectID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways thanks Basson..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Aug 2016 12:43:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-query-a-flat-table-in-javascript-api/m-p/460048#M42520</guid>
      <dc:creator>ShaikhRizuan</dc:creator>
      <dc:date>2016-08-22T12:43:27Z</dc:date>
    </item>
  </channel>
</rss>

