<?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 Fetching data from DOM. in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/fetching-data-from-dom/m-p/178261#M8750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I had created an application using ArcGIS Portal/Web App Builder 2.0. Now I have to create the Reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implemented:&lt;/P&gt;&lt;P&gt;In WebAppBuilder, I had published the map service and added in the webappbuilder and symbologies are visible, I can View/Edit data using Widgets. Since, No Reports are available,&amp;nbsp;I created an HTML page and used the &amp;nbsp;&lt;/P&gt;&lt;P&gt;var queryTask = new QueryTask and obtained the records from the attribute table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&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%2Fdomain.com%2Fagswa%2Frest%2Fservices%2FPractise%2FDeployment%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;https://domain.com/agswa/rest/services/Practise/Deployment/MapServer/0&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var query = new Query();&lt;BR /&gt; query.returnGeometry = false;&lt;BR /&gt;query.outFields = [&lt;BR /&gt; "OBJECTID", "Type", "Location", "Status", "Office_Type",&lt;BR /&gt; "Country", "Strength"&lt;BR /&gt; ];&lt;/P&gt;&lt;P&gt;on(dom.byId("execute"), "click", execute);&lt;/P&gt;&lt;P&gt;function execute () {&lt;BR /&gt; query.text = dom.byId("Location").value;&lt;BR /&gt; // query.where = "XYZ"; --Error&lt;BR /&gt;queryTask.execute(query, showResults);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function showResults(results) {&lt;BR /&gt; var resultItems = [];&lt;BR /&gt; var resultCount = results.features.length;&lt;BR /&gt; for (var i = 0; i &amp;lt; resultCount; i++) {&lt;BR /&gt; var featureAttributes = results.features&lt;I&gt;.attributes;&lt;BR /&gt; for (var attr in featureAttributes) {&lt;BR /&gt; resultItems.push("&amp;lt;b&amp;gt;" + attr + ":&amp;lt;/b&amp;gt; " + featureAttributes[attr] + "&amp;lt;br&amp;gt;");&lt;BR /&gt; }&lt;BR /&gt; resultItems.push("&amp;lt;br&amp;gt;");&lt;BR /&gt; }&lt;BR /&gt; dom.byId("info").innerHTML = resultItems.join("");&lt;BR /&gt; }&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;P&gt;1. Can fetch the desired data from DOM like, Location and its related data [Since for reports, I am pointing to published map server and fetching the same data again]&lt;/P&gt;&lt;P&gt;2. If yes, Data can be fetched through DOM, How to fetch the data from DOM.?&lt;/P&gt;&lt;P&gt;3. I placed the filter&amp;nbsp;&lt;SPAN&gt;// query.where = "&lt;/SPAN&gt;&lt;SPAN&gt;XYZ&lt;/SPAN&gt;&lt;SPAN&gt;"; - Show error, even though data is present.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jan 2017 10:40:41 GMT</pubDate>
    <dc:creator>MathanManohar</dc:creator>
    <dc:date>2017-01-27T10:40:41Z</dc:date>
    <item>
      <title>Fetching data from DOM.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/fetching-data-from-dom/m-p/178261#M8750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I had created an application using ArcGIS Portal/Web App Builder 2.0. Now I have to create the Reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Implemented:&lt;/P&gt;&lt;P&gt;In WebAppBuilder, I had published the map service and added in the webappbuilder and symbologies are visible, I can View/Edit data using Widgets. Since, No Reports are available,&amp;nbsp;I created an HTML page and used the &amp;nbsp;&lt;/P&gt;&lt;P&gt;var queryTask = new QueryTask and obtained the records from the attribute table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&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%2Fdomain.com%2Fagswa%2Frest%2Fservices%2FPractise%2FDeployment%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;https://domain.com/agswa/rest/services/Practise/Deployment/MapServer/0&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;var query = new Query();&lt;BR /&gt; query.returnGeometry = false;&lt;BR /&gt;query.outFields = [&lt;BR /&gt; "OBJECTID", "Type", "Location", "Status", "Office_Type",&lt;BR /&gt; "Country", "Strength"&lt;BR /&gt; ];&lt;/P&gt;&lt;P&gt;on(dom.byId("execute"), "click", execute);&lt;/P&gt;&lt;P&gt;function execute () {&lt;BR /&gt; query.text = dom.byId("Location").value;&lt;BR /&gt; // query.where = "XYZ"; --Error&lt;BR /&gt;queryTask.execute(query, showResults);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;function showResults(results) {&lt;BR /&gt; var resultItems = [];&lt;BR /&gt; var resultCount = results.features.length;&lt;BR /&gt; for (var i = 0; i &amp;lt; resultCount; i++) {&lt;BR /&gt; var featureAttributes = results.features&lt;I&gt;.attributes;&lt;BR /&gt; for (var attr in featureAttributes) {&lt;BR /&gt; resultItems.push("&amp;lt;b&amp;gt;" + attr + ":&amp;lt;/b&amp;gt; " + featureAttributes[attr] + "&amp;lt;br&amp;gt;");&lt;BR /&gt; }&lt;BR /&gt; resultItems.push("&amp;lt;br&amp;gt;");&lt;BR /&gt; }&lt;BR /&gt; dom.byId("info").innerHTML = resultItems.join("");&lt;BR /&gt; }&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;P&gt;1. Can fetch the desired data from DOM like, Location and its related data [Since for reports, I am pointing to published map server and fetching the same data again]&lt;/P&gt;&lt;P&gt;2. If yes, Data can be fetched through DOM, How to fetch the data from DOM.?&lt;/P&gt;&lt;P&gt;3. I placed the filter&amp;nbsp;&lt;SPAN&gt;// query.where = "&lt;/SPAN&gt;&lt;SPAN&gt;XYZ&lt;/SPAN&gt;&lt;SPAN&gt;"; - Show error, even though data is present.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jan 2017 10:40:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/fetching-data-from-dom/m-p/178261#M8750</guid>
      <dc:creator>MathanManohar</dc:creator>
      <dc:date>2017-01-27T10:40:41Z</dc:date>
    </item>
  </channel>
</rss>

