<?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 for Arc Map in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198663#M65151</link>
    <description>&lt;P&gt;I will also give this a try. Have you ever tired using it in a Label expression? That is mostly where I am struggling. The expressions seems to behave different then a normal python IDE environment. Thank you so much for the help!&lt;/P&gt;</description>
    <pubDate>Tue, 02 Aug 2022 18:07:56 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2022-08-02T18:07:56Z</dc:date>
    <item>
      <title>Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1196584#M65073</link>
      <description>&lt;P&gt;First timer here, I am attempting to create a number of complex Label expressions in Arc Map. The problems is, how do you get a specific piece of a sting that is in a long text field. For example i am trying to say: if a field contains the string "ATM" then create a label "ATM. See below snippet.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeremiahMcDonald_0-1658959858309.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/46964iD42CD95F137F71DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeremiahMcDonald_0-1658959858309.png" alt="JeremiahMcDonald_0-1658959858309.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;No a simple DQ or Schema change will not work as I need to create labels based on all these categories and then push them to a SDE database ENV.&amp;nbsp; I am trying to improve my python ability. Please any help would be much appreciated. Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 22:13:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1196584#M65073</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-07-27T22:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1196587#M65074</link>
      <description>&lt;P&gt;Maybe instead of the == in the operator, use "in".&lt;/P&gt;&lt;P&gt;This site has some info on using the "in" operator:&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackabuse.com/python-check-if-string-contains-substring/" target="_blank"&gt;https://stackabuse.com/python-check-if-string-contains-substring/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 22:20:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1196587#M65074</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2022-07-27T22:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1196590#M65075</link>
      <description>&lt;P&gt;split Notes by the commas to produce a list, trim the resultant strings if necessary and see if ATM is in the list&lt;/P&gt;&lt;P&gt;I don't have an IDE available, but&lt;/P&gt;&lt;LI-CODE lang="python"&gt;val_lst = [i.trim() for i in [Notes].split(",")]
if "ATM" in val_lst:
    ....
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 27 Jul 2022 22:23:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1196590#M65075</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-07-27T22:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198526#M65135</link>
      <description>&lt;P&gt;thank you, so are you trying to loop an array?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 14:21:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198526#M65135</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-02T14:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198578#M65148</link>
      <description>&lt;P&gt;There is a Python &lt;A href="https://docs.python.org/3/library/stdtypes.html#str.find" target="_blank" rel="noopener"&gt;str.find()&lt;/A&gt; method.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 15:35:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198578#M65148</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2022-08-02T15:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198663#M65151</link>
      <description>&lt;P&gt;I will also give this a try. Have you ever tired using it in a Label expression? That is mostly where I am struggling. The expressions seems to behave different then a normal python IDE environment. Thank you so much for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2022 18:07:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198663#M65151</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-02T18:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198960#M65167</link>
      <description>&lt;P&gt;I understand what you mean about the different convention with field names having to be in brackets, but I re-tested using str.find() and it works as expected in a label expression.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 15:05:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1198960#M65167</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2022-08-03T15:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1199540#M65212</link>
      <description>&lt;P&gt;Thank you so much can't wait to try it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 18:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1199540#M65212</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-04T18:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Python Label Expression for Arc Map</title>
      <link>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1199660#M65216</link>
      <description>&lt;P&gt;def FindLabel ( [NOTES] &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;if "ATM" in [NOTES]:&lt;BR /&gt;return "ATM"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked great! Thanks everyone.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 22:17:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-label-expression-for-arc-map/m-p/1199660#M65216</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-04T22:17:13Z</dc:date>
    </item>
  </channel>
</rss>

