<?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: python label expression does not filter labels in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706844#M54793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked great! Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Dec 2013 14:50:34 GMT</pubDate>
    <dc:creator>SWCASWCA</dc:creator>
    <dc:date>2013-12-19T14:50:34Z</dc:date>
    <item>
      <title>python label expression does not filter labels</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706842#M54791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a taxlot layer with a numeric (double) field called GIS_ACRES. I only want to label those features that are greater than 1 acre in size. I am using this expression:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def FindLabel ( [GIS_ACRES], [TLID]&amp;nbsp; ): &amp;nbsp; if ( [GIS_ACRES]&amp;nbsp; &amp;gt; 1 ): &amp;nbsp;&amp;nbsp;&amp;nbsp; return [TLID][-5:] &amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp; return ""&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;also tried if ( [GIS_ACRES] ) &amp;gt; 1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;makes no difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It labels ALL taxlots, regardless of size. Why doesn't it work? What syntax am I missing? I get no errors, just doesn't filter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I recently installed 10.2 over 10.1. Should I also have updated something related to Python?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:49:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706842#M54791</guid>
      <dc:creator>SWCASWCA</dc:creator>
      <dc:date>2013-12-19T13:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: python label expression does not filter labels</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706843#M54792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello SWCA,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems like python isn't recognizing your [GIS_ACRES] field as a double field (or even as a number). To get around this you can convert it to a float. It's also probably a good idea to compare it to another float (1.0 instead of 1).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def FindLabel ( [GIS_ACRES], [TLID]&amp;nbsp; ): &amp;nbsp; if ( float([GIS_ACRES])&amp;nbsp; &amp;gt; 1.0 ): &amp;nbsp;&amp;nbsp;&amp;nbsp; return [TLID][-5:] &amp;nbsp; else: &amp;nbsp;&amp;nbsp;&amp;nbsp; return ""&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know how it goes,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:24:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706843#M54792</guid>
      <dc:creator>JoshuaChisholm</dc:creator>
      <dc:date>2013-12-19T14:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: python label expression does not filter labels</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706844#M54793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That worked great! Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:50:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-does-not-filter-labels/m-p/706844#M54793</guid>
      <dc:creator>SWCASWCA</dc:creator>
      <dc:date>2013-12-19T14:50:34Z</dc:date>
    </item>
  </channel>
</rss>

