<?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: Label Expression HELP! in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516788#M40541</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got it! Thank you so much for your help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Jan 2013 17:33:51 GMT</pubDate>
    <dc:creator>CaraMays</dc:creator>
    <dc:date>2013-01-16T17:33:51Z</dc:date>
    <item>
      <title>Label Expression HELP!</title>
      <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516784#M40537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Below is my current expression that is labeling landowner names, abbreviated to the first letter of their first name with a comma dividing the first initial with the last name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to add the PID directly below the name. I would like the PID to have the same label characteristics as the name or "PartyName" does. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone else where to add the PID and how to correctly format this. THANKS!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Function FindLabel ( [PartyName] )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if InStr( [PartyName] , ",") &amp;gt; 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;myArray = Split( [PartyName] , ",")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FindLabel = myArray(0) &amp;amp; ", " &amp;amp; LEFT(Trim(myArray(1)), 1) &amp;amp; "."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ElseIf Len( [PartyName] ) &amp;gt; 13 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FindLabel = Left([PartyName], 13)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FindLabel = [PartyName]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 12:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516784#M40537</guid>
      <dc:creator>CaraMays</dc:creator>
      <dc:date>2013-01-16T12:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression HELP!</title>
      <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516785#M40538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You posted the same question here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/75326-Label-Expression"&gt;http://forums.arcgis.com/threads/75326-Label-Expression&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So do you want the equivalent expression in python?&amp;nbsp; I think it doesn't matter really what parser you use, but maybe you're just short on details?&amp;nbsp; For example, if you want to introduce values from another field, you have to use the field name as it appears in your table.&amp;nbsp; Is your parcel identifier field name PID?...is it numeric or text?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'd get much better cooperation from these forums if you are attentive to such details, don't ask duplicate questions, etc., and enter code properly formatted-- select your code block and use the '#' button to auto-enter the CODE tags, or enter them 'manually', typing  after your code block and &lt;PRE&gt; before...&lt;/PRE&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 13:17:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516785#M40538</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-01-16T13:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression HELP!</title>
      <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516786#M40539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was aware that I posted the same question in another forum. That thread has since been deleted as it should have been before I posted it again in the python forum. I was directed to ask my question in the python forum rather than there I initially posted it. There are people who do not have interest in some fields therefore are not as attentive to other forums. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My PID field is a text field. I listed my parcel identifier as named PID in the my original thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wasn't aware of the correct way to enter a code, this is exactly how I wrote the label expression in my layer so I guess I hoped it would be enough for people with experience in scripting to understand.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 13:52:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516786#M40539</guid>
      <dc:creator>CaraMays</dc:creator>
      <dc:date>2013-01-16T13:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression HELP!</title>
      <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516787#M40540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Fair enough, do something like the following, with the Python parser:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;def FindLabel([PartyName], [PID]):&amp;nbsp; Party, PID = [PartyName], [PID]&amp;nbsp; YourLabel = ''&amp;nbsp; if ',' in Party: &amp;nbsp; Party = Party.split(',') &amp;nbsp; YourLabel = Party[0].strip() + ', ' + Party[1].strip()[0:1] + '.'&amp;nbsp; elif len(Party) &amp;gt; 13: &amp;nbsp; YourLabel = Party[0:13]&amp;nbsp; else: &amp;nbsp; YourLabel = Party&amp;nbsp; YourLabel = YourLabel + '\n' + PID&amp;nbsp; return YourLabel&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;More info is in the webhelp here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Building label expressions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Desktop » Mapping » Adding text to a map » Displaying labels&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Building_label_expressions/00s800000027000000/" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/Building_label_expressions/00s800000027000000/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 15:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516787#M40540</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-01-16T15:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression HELP!</title>
      <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516788#M40541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Got it! Thank you so much for your help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 17:33:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516788#M40541</guid>
      <dc:creator>CaraMays</dc:creator>
      <dc:date>2013-01-16T17:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Label Expression HELP!</title>
      <link>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516789#M40542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Terrific...!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Now if you would, please make this post as answered, thank you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&amp;nbsp; Please 'mark' this post as answered is what I meant to write... if unfamiliar with the controls, use what I call the 'toggle' button in the upper right margin beside the post.&amp;nbsp; The 'check mark' means 'answered', otherwise you can award points by 'toggling' the arrows.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 17:51:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/label-expression-help/m-p/516789#M40542</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-01-16T17:51:40Z</dc:date>
    </item>
  </channel>
</rss>

