<?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 map service to ensure that the dataset/result is not empty before adding the layer to the map in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-query-a-map-service-to-ensure-that-the/m-p/803513#M5496</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michel,&lt;/P&gt;&lt;BLOCKQUOTE&gt;but this for the ArcGIS API for JavaScript&lt;/BLOCKQUOTE&gt;&lt;P&gt;Which is what WAB is built on. If you are never getting to the&amp;nbsp;showResults function then you have an error in your code. Hard to tell you much more with out seeing your widget code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Oct 2020 12:44:58 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2020-10-19T12:44:58Z</dc:date>
    <item>
      <title>How to query a map service to ensure that the dataset/result is not empty before adding the layer to the map</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-query-a-map-service-to-ensure-that-the/m-p/803512#M5495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a widget that adds several layers on the map but before I add a layer on the map I want to make sure that the query associated to the layer does not return an empty set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have found an example using QueryTask to get data but this for the ArcGIS API for JavaScript. I have tried to include the code within my widget but it never gets to the&amp;nbsp; showResults function in my attached file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Here is my environment:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;- Portal for ArcGIS version 10.6&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;- Web AppBuilder Developer Edition 2.6&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;- ArcGIS JavaScript API 3.33&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;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Is there any way for me to check if the query associated to a layer will be empty before I add the layer to the map?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2020 22:27:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-query-a-map-service-to-ensure-that-the/m-p/803512#M5495</guid>
      <dc:creator>MichelTurmel</dc:creator>
      <dc:date>2020-10-16T22:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a map service to ensure that the dataset/result is not empty before adding the layer to the map</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-query-a-map-service-to-ensure-that-the/m-p/803513#M5496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michel,&lt;/P&gt;&lt;BLOCKQUOTE&gt;but this for the ArcGIS API for JavaScript&lt;/BLOCKQUOTE&gt;&lt;P&gt;Which is what WAB is built on. If you are never getting to the&amp;nbsp;showResults function then you have an error in your code. Hard to tell you much more with out seeing your widget code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Oct 2020 12:44:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/how-to-query-a-map-service-to-ensure-that-the/m-p/803513#M5496</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-10-19T12:44:58Z</dc:date>
    </item>
  </channel>
</rss>

