<?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 Problem with Layer Definition Queries for Local Layer Widget Server 10.5 in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/problem-with-layer-definition-queries-for-local/m-p/795617#M4635</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have several Dynamic Layers in WAB Local Layer Widget with a definition query. I just upgraded to ArcGIS Server10.5 and found the bug. I got the patch (&lt;A class="link-titled" href="http://support.esri.com/download/7489" title="http://support.esri.com/download/7489"&gt;ArcGIS Server 10.5 Layer Definition Query Patch&lt;/A&gt;&amp;nbsp;) downloaded and installed that then tried again and still get the error:&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;{"error":{"code":400,"message":"Invalid 'layerDefs' is specified","details":[]}}&lt;/PRE&gt;&lt;P&gt;this is the local layer config:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"definitionQueries": "{\"1\":\"floor_name_snfs02 = '1st Flr'\"}"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have a map switcher widget that uses ImageParameters layerDefs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var imageParameters = new ImageParameters();&lt;BR /&gt; var layerDefs = [];&lt;BR /&gt; layerDefs[1] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[2] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[3] = "floor_name_snfs01 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[4] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[5] = "Floor = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[6] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[7] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[11] = "Floor = '" + FLOOR +"'";&lt;BR /&gt; imageParameters.layerDefinitions = layerDefs;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to see if the patch worked or do i need to write the definition queries in a different format?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jun 2017 22:44:49 GMT</pubDate>
    <dc:creator>ChadRicks</dc:creator>
    <dc:date>2017-06-07T22:44:49Z</dc:date>
    <item>
      <title>Problem with Layer Definition Queries for Local Layer Widget Server 10.5</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/problem-with-layer-definition-queries-for-local/m-p/795617#M4635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have several Dynamic Layers in WAB Local Layer Widget with a definition query. I just upgraded to ArcGIS Server10.5 and found the bug. I got the patch (&lt;A class="link-titled" href="http://support.esri.com/download/7489" title="http://support.esri.com/download/7489"&gt;ArcGIS Server 10.5 Layer Definition Query Patch&lt;/A&gt;&amp;nbsp;) downloaded and installed that then tried again and still get the error:&lt;/P&gt;&lt;PRE style="color: #000000;"&gt;{"error":{"code":400,"message":"Invalid 'layerDefs' is specified","details":[]}}&lt;/PRE&gt;&lt;P&gt;this is the local layer config:&amp;nbsp;&lt;/P&gt;&lt;P&gt;"definitionQueries": "{\"1\":\"floor_name_snfs02 = '1st Flr'\"}"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have a map switcher widget that uses ImageParameters layerDefs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var imageParameters = new ImageParameters();&lt;BR /&gt; var layerDefs = [];&lt;BR /&gt; layerDefs[1] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[2] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[3] = "floor_name_snfs01 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[4] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[5] = "Floor = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[6] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[7] = "floor_name_snfs02 = '" + FLOOR +"'";&lt;BR /&gt; layerDefs[11] = "Floor = '" + FLOOR +"'";&lt;BR /&gt; imageParameters.layerDefinitions = layerDefs;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to see if the patch worked or do i need to write the definition queries in a different format?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jun 2017 22:44:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/problem-with-layer-definition-queries-for-local/m-p/795617#M4635</guid>
      <dc:creator>ChadRicks</dc:creator>
      <dc:date>2017-06-07T22:44:49Z</dc:date>
    </item>
  </channel>
</rss>

