<?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: Where Expression in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/where-expression/m-p/369115#M29137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaitlyn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example on how to do this using the Python parser:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14117471072794322" jivemacro_uid="_14117471072794322"&gt;
&lt;P&gt;def FindLabel ([FIELDX], [FIELDY] ):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if&amp;nbsp; [FIELDX] == 'other':&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return [FIELDY]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return [FIELDX]&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a screen shot of the Label Expression dialog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/15478_screen1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Sep 2014 15:59:15 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2014-09-26T15:59:15Z</dc:date>
    <item>
      <title>Where Expression</title>
      <link>https://community.esri.com/t5/python-questions/where-expression/m-p/369114#M29136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi-&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to label a field using an expression.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the attribute to be labeled with field x except when field x equals "other" than I want it to be labeled with field y.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to write the code/expression.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated, thanks!&lt;/P&gt;&lt;P&gt;Kait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 15:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/where-expression/m-p/369114#M29136</guid>
      <dc:creator>PamFoster</dc:creator>
      <dc:date>2014-09-26T15:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Where Expression</title>
      <link>https://community.esri.com/t5/python-questions/where-expression/m-p/369115#M29137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kaitlyn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example on how to do this using the Python parser:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14117471072794322" jivemacro_uid="_14117471072794322"&gt;
&lt;P&gt;def FindLabel ([FIELDX], [FIELDY] ):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; if&amp;nbsp; [FIELDX] == 'other':&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return [FIELDY]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; else:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return [FIELDX]&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is a screen shot of the Label Expression dialog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screen1.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/15478_screen1.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 15:59:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/where-expression/m-p/369115#M29137</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-09-26T15:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Where Expression</title>
      <link>https://community.esri.com/t5/python-questions/where-expression/m-p/369116#M29138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! That worked!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 16:19:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/where-expression/m-p/369116#M29138</guid>
      <dc:creator>PamFoster</dc:creator>
      <dc:date>2014-09-26T16:19:32Z</dc:date>
    </item>
  </channel>
</rss>

