<?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 use definitionexpression in &amp;lt;sublayer&amp;gt;? in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273595#M8237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only documentation there is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Child tag specific to layers of type dynamic and tiles&lt;BR /&gt;&amp;lt;sublayer&amp;gt; supports the following properties:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * id - the id, usually a number, of the sublayer within the Map Service.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * popupconfig - URL to the xml configuration file the pop-up window. See Pop-up configuration files for more information.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * definitionexpression - Limits the data to a subset of the available features in the map service layer. It is similar to the definition query for a layer in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can sublayers support a popup and a definitionexpression simultaneously?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried the format you specified, grouped with a popup as well as without the popup - neither works to limit the drawing of the feature in the viewer to the specified query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a sample from my config:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; &amp;lt;operationallayers&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Tacoma M7.1" type="dynamic" visible="true" alpha="0.75" preload="open"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://140.160.114.190/ArcGIS/rest/services/Seismic/Tacoma/MapServer"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="1" definitionxpression="countyname = King" popupconfig="popups/PopUp_DBs_EF_CareFlty.xml"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="2" popupconfig="popups/PopUp_DBs_UTIL_OilFlty.xml"/&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:21:14 GMT</pubDate>
    <dc:creator>BenKane</dc:creator>
    <dc:date>2021-12-11T13:21:14Z</dc:date>
    <item>
      <title>How to use definitionexpression in &amp;lt;sublayer&amp;gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273593#M8235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How do I implement a definition query using definitionexpression in the sublayer tag?&amp;nbsp; I see that it's possible but I can't find anywhere any sample code or syntax for how to implement this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 19:34:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273593#M8235</guid>
      <dc:creator>BenKane</dc:creator>
      <dc:date>2011-08-26T19:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273594#M8236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; You can find the documentation on this here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m30000000p000000.htm"&gt;http://help.arcgis.com/en/webapps/flexviewer/help/01m3/01m30000000p000000.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;&amp;lt;sublayer id="1" definitionexpression="ObjectId = 23"/&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 20:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273594#M8236</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-08-26T20:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273595#M8237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only documentation there is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;Child tag specific to layers of type dynamic and tiles&lt;BR /&gt;&amp;lt;sublayer&amp;gt; supports the following properties:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * id - the id, usually a number, of the sublayer within the Map Service.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * popupconfig - URL to the xml configuration file the pop-up window. See Pop-up configuration files for more information.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; * definitionexpression - Limits the data to a subset of the available features in the map service layer. It is similar to the definition query for a layer in ArcMap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can sublayers support a popup and a definitionexpression simultaneously?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried the format you specified, grouped with a popup as well as without the popup - neither works to limit the drawing of the feature in the viewer to the specified query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a sample from my config:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; &amp;lt;operationallayers&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Tacoma M7.1" type="dynamic" visible="true" alpha="0.75" preload="open"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://140.160.114.190/ArcGIS/rest/services/Seismic/Tacoma/MapServer"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="1" definitionxpression="countyname = King" popupconfig="popups/PopUp_DBs_EF_CareFlty.xml"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="2" popupconfig="popups/PopUp_DBs_UTIL_OilFlty.xml"/&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273595#M8237</guid>
      <dc:creator>BenKane</dc:creator>
      <dc:date>2021-12-11T13:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273596#M8238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The secret is going to be the right SQL syntax. You are searching for a string so you need to have king in single quotes.&amp;nbsp; 'King'&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 22:31:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273596#M8238</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-08-26T22:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273597#M8239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I thought you might say that...but unfortunately that doesn't help.&amp;nbsp; I had a brief moment of excitement when I noticed that I had a typo in the config with "definitionxpression" instead of "definition&lt;/SPAN&gt;&lt;STRONG&gt;e&lt;/STRONG&gt;&lt;SPAN&gt;xpression", but upon changing that still no luck...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried the definitionexpression on other layers as well to avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Aug 2011 23:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273597#M8239</guid>
      <dc:creator>BenKane</dc:creator>
      <dc:date>2011-08-26T23:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273598#M8240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I'm not sure what you are doing wrong then... Here is one I got to work just fine on my end.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Louisville Landbase" type="dynamic" visible="true" alpha="0.4"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="1" definitionexpression="LANDUSE_NAME = 'GENERAL COMM. AND OFFICE'"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layer&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:21:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273598#M8240</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T13:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273599#M8241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Aside from the attribute value quoting, it appears that you simply haven't "closed" the layer tag, although you may have simply not included it in your code sample.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; &amp;lt;operationallayers&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="Tacoma M7.1" type="dynamic" visible="true" alpha="0.75" preload="open"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://140.160.114.190/ArcGIS/rest/services/Seismic/Tacoma/MapServer"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="1" definitionexpression="countyname = 'King'" popupconfig="popups/PopUp_DBs_EF_CareFlty.xml"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="2" popupconfig="popups/PopUp_DBs_UTIL_OilFlty.xml"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layer&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:21:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273599#M8241</guid>
      <dc:creator>BrianOevermann</dc:creator>
      <dc:date>2021-12-11T13:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273600#M8242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having this same problem.&amp;nbsp; I know that I've structured my definitionexpression properly because I can place the syntax into the Where portion of the rest query and it returns the records just fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 18:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273600#M8242</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2011-08-30T18:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273601#M8243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeremy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post the config code that isn't working?&amp;nbsp; Like Robert, I have been able to get this to work.&amp;nbsp; My example is below.&amp;nbsp; I used a service whose feature class has a joined table, so I needed to fully qualify my field name.&amp;nbsp; Since you are able to query successfully via the REST dialog you have probably taken care of that if it is necessary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;layer label="General Data" type="dynamic" visible="true" alpha="0.4"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://myServer/ArcGIS/rest/services/General_Mapservices/general/MapServer"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="0" definitionexpression="myDB.COI.SiteAddress.BusinessName='TARGET'"/&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layer&amp;gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:21:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273601#M8243</guid>
      <dc:creator>BrianOevermann</dc:creator>
      <dc:date>2021-12-11T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273602#M8244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since this is a public service you can try it in your own viewer.&amp;nbsp; If I put "AGBUR = 'BIA' into the query at &lt;/SPAN&gt;&lt;A href="http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer/2" rel="nofollow noopener noreferrer" target="_blank"&gt;http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer/2&lt;/A&gt;&lt;SPAN&gt; it works fine.&amp;nbsp; I'm not sure what's missing&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;layer label="USA Federal Lands - Reservations" type="dynamic" visible="false" alpha=".7"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="http://maps1.arcgisonline.com/ArcGIS/rest/services/USA_Federal_Lands/MapServer"&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="2" definitionexpression="AGBUR = 'BIA'"/&amp;gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layer&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:21:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273602#M8244</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2021-12-11T13:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273603#M8245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeremy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm at a loss.&amp;nbsp; The only difference I noticed is that the map service you are using has your layer ID 2 as part of a group layer.&amp;nbsp; Admittedly this is a very thin hypothesis, but maybe there is a quirky sort of bug related to group layers and definition expressions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben's example is not directly using a layer within a group layer, but his service contains group layers. Robert's example is using a service that has no group layers present.&amp;nbsp; My example also has no group layers present.&amp;nbsp; I'm not sure if there is any merit to the idea, and I don't have the time available to exhaustively test this, but maybe you do have the time?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an exercise, I copy/pasted your code block into the v2.4 viewer I am upgrading to.&amp;nbsp; I did change the value from 'BIA' to 'FS' because I know that we have U.S. Forest Service lands in reasonable proximity to our city.&amp;nbsp; I kept zooming out and noted that there are other labels (part of the map service group layer) that indicate features that the definition expression is eliminating, so your code appears to be working correctly for me.&amp;nbsp; See the attached screen shot.&amp;nbsp; There goes the group layer bug theory! [maybe]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It probably goes without saying, but you are using this tag against API 2.4 and not an earlier version, correct?&amp;nbsp; Just trying to cover the possibilities...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 20:32:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273603#M8245</guid>
      <dc:creator>BrianOevermann</dc:creator>
      <dc:date>2011-08-30T20:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273604#M8246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeremy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I have tested the map service your provided as well, and as Brian, I &lt;/SPAN&gt;&lt;STRONG&gt;was&lt;/STRONG&gt;&lt;SPAN&gt; able to get the layer definition to work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 02:48:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273604#M8246</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-08-31T02:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273605#M8247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks guys...I did realize what the problem was late last night as I tested this further.&amp;nbsp; The application that we were testing this in is still 2.3.x.&amp;nbsp; We will be upgrading it to v. 2.4 during our next release cycle.&amp;nbsp; I tested it in a fresh 2.4 viewer last night and it worked fine.&amp;nbsp; Thanks for the help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeremy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 12:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273605#M8247</guid>
      <dc:creator>CharlesHarris</dc:creator>
      <dc:date>2011-08-31T12:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273606#M8248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oops, yeah I made the same mistake...I've upgraded to Flexviewer 2.4 and now my definitionexpression works.&amp;nbsp; Thanks Robert and Jeremy for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2011 22:12:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273606#M8248</guid>
      <dc:creator>BenKane</dc:creator>
      <dc:date>2011-09-06T22:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273607#M8249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's one that I cannot get to work..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;layer label="USGS National Hazard System 1" type="dynamic" visible="false" alpha="1.0"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer" rel="nofollow" target="_blank"&gt;http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_haz/MapServer&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="5" popupconfig="popups/PopUp_USGS_NHSS_Wildfire.xml"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sublayer id="6" definitionexpression="ACTIVE='Y'"&amp;nbsp; popupconfig="popups/PopUp_USGS_NHSS_WildfirePerimeters.xml"&amp;nbsp; /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/layer&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding this definitionexpression makes this whole layer not show up.&amp;nbsp; Does anyone see anything obvious. I'm using 2.4&amp;nbsp; thanks&amp;nbsp; Brian Kaplan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Sep 2011 20:48:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273607#M8249</guid>
      <dc:creator>BrianKaplan</dc:creator>
      <dc:date>2011-09-20T20:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273608#M8250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Brian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I don't see anything wrong here and I have tested and verified the issue you are having. I sorry to say I have not found a resolution though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 12:55:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273608#M8250</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-09-21T12:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to use definitionexpression in &lt;sublayer&gt;?</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273609#M8251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for checking.&amp;nbsp; When I add the rest layer to ArcMap, the legend comes up with the polygon symbol and a Y.&amp;nbsp; The polygon represents multiple datarows. When I use the info buttom, I get all records with N and Y, so something may be funky with the data feed.&amp;nbsp; Brian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 16:02:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/how-to-use-definitionexpression-in-amp-lt-sublayer/m-p/273609#M8251</guid>
      <dc:creator>BrianKaplan</dc:creator>
      <dc:date>2011-09-21T16:02:33Z</dc:date>
    </item>
  </channel>
</rss>

