<?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: Refreshing the layer on map, web app builder in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613405#M16239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to refresh it based on where clause, this will change based on user selection.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jan 2018 14:52:52 GMT</pubDate>
    <dc:creator>akshayloya</dc:creator>
    <dc:date>2018-01-11T14:52:52Z</dc:date>
    <item>
      <title>Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613403#M16237</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 have a web map with a accident layer added. I have created web app builder application with this web map.&lt;/P&gt;&lt;P&gt;I have following widgets:&lt;/P&gt;&lt;P&gt;1) Layer List&lt;/P&gt;&lt;P&gt;2) Situation Awareness&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Near Me&lt;/P&gt;&lt;P&gt;4) Info Summary&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom widget for date selection. There is a date field&amp;nbsp;in my&amp;nbsp;&lt;SPAN&gt;accident layer. I want to refresh this layer which is already added on map based on the date filter.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hoping for the positive response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Akshay Loya&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613403#M16237</guid>
      <dc:creator>akshayloya</dc:creator>
      <dc:date>2018-01-11T14:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613404#M16238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Akshay,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp; &amp;nbsp;In the web map (on AGOL/Portal) set a refresh interval on your layer if the data is updated frequently.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613404#M16238</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-01-11T14:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613405#M16239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to refresh it based on where clause, this will change based on user selection.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:52:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613405#M16239</guid>
      <dc:creator>akshayloya</dc:creator>
      <dc:date>2018-01-11T14:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613406#M16240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then in your custom widget just call&lt;/P&gt;&lt;P&gt;layer.refresh();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613406#M16240</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-01-11T14:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613407#M16241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but how to put where clause on the layer already added on web map and refresh it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:56:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613407#M16241</guid>
      <dc:creator>akshayloya</dc:creator>
      <dc:date>2018-01-11T14:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613408#M16242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#setdefinitionexpression" title="https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#setdefinitionexpression"&gt;https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html#setdefinitionexpression&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 14:59:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613408#M16242</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-01-11T14:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613409#M16243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is the code I've written&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #000000; background-color: #ffffff; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; layers &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.map.getLayersVisibleAtScale(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;this&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.map.getScale());&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt; array.forEach(layers, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; (layer) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; (layer.id &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;'Spills_map_series_3947'&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt; layer.setDefinitionExpression(&lt;/SPAN&gt;&lt;SPAN style="color: #a31515;"&gt;"County='KING'"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt; layer.refresh();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;But I'm getting an error as attached&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #000000;"&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/392683_Capture1.PNG" /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 15:40:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613409#M16243</guid>
      <dc:creator>akshayloya</dc:creator>
      <dc:date>2018-01-11T15:40:43Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613410#M16244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Akshay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Try this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; layers &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getLayersVisibleAtScale&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getScale&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
array&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;forEach&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Spills_map_series_3947'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;info&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;className&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setDefinitionExpression&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"County='KING'"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And show me what the console says&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:14:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613410#M16244</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T02:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613411#M16245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is giving&amp;nbsp;undefined.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late response. Somehow Geonet service was down.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 05:05:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613411#M16245</guid>
      <dc:creator>akshayloya</dc:creator>
      <dc:date>2018-01-12T05:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Refreshing the layer on map, web app builder</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613412#M16246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, I was trying it with map service. I changed it too feature service and it is working now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just need to apply for situation awareness widget now, somehow it doesn't take the filtered layer for query.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 05:59:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/refreshing-the-layer-on-map-web-app-builder/m-p/613412#M16246</guid>
      <dc:creator>akshayloya</dc:creator>
      <dc:date>2018-01-12T05:59:30Z</dc:date>
    </item>
  </channel>
</rss>

