<?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: Pro corrupts my python label expressions when using a table join. in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201449#M58456</link>
    <description>&lt;P&gt;Has anyone else experienced this issue?&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2022 17:43:49 GMT</pubDate>
    <dc:creator>Matt-Goodman</dc:creator>
    <dc:date>2022-08-10T17:43:49Z</dc:date>
    <item>
      <title>Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201313#M58429</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using python label expressions to label address points. They concatenate various address element fields using python's &lt;FONT face="courier new,courier"&gt;.join()&lt;/FONT&gt; function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I apply an attribute join to my address point feature class (in an enterprise geodatabase) my python label expressions are altered by the program and they no longer work.&lt;/P&gt;&lt;P&gt;Here is the python label expression before applying the join (works great like this):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;' '.join(str(i) for i in ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF]) if i)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the same expression after applying the join, Pro has altered it (the syntax is bad / does not work):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;' sde.SL.address.'.josde.SL.address.IN(str(i) sde.SL.address.for i sde.SL.address.IN ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF]) sde.SL.address.if i)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above, you can see that it mishandled the original python expression. It did not handle the opening parenthesis correctly and it upper-cased all instances of python '&lt;FONT face="courier new,courier" color="#0000FF"&gt;in&lt;/FONT&gt;' to (SQL?) &lt;FONT color="#000000"&gt;'&lt;/FONT&gt;&lt;FONT face="courier new,courier" color="#808080"&gt;IN&lt;/FONT&gt;&lt;FONT color="#000000"&gt;'&lt;/FONT&gt;, even in the word '&lt;FONT face="courier new,courier"&gt;joIN&lt;/FONT&gt;'. Also, I don't know why the letters '&lt;FONT face="courier new,courier"&gt;jo&lt;/FONT&gt;' were appended to '&lt;FONT face="courier new,courier"&gt;sde&lt;/FONT&gt;', which is the database instance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, here is the same python expression after I have removed the table join and the program has tried (unsuccessfully) to revert it back to its original syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;' '.joIN(str(i) for i IN ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF]) if i)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Notice the two instances of capitalized '&lt;FONT face="courier new,courier"&gt;IN&lt;/FONT&gt;'. Python doesn't like these.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking this should be logged as a bug that needs to get fixed?&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 14:40:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201313#M58429</guid>
      <dc:creator>Matt-Goodman</dc:creator>
      <dc:date>2022-08-10T14:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201449#M58456</link>
      <description>&lt;P&gt;Has anyone else experienced this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 17:43:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201449#M58456</guid>
      <dc:creator>Matt-Goodman</dc:creator>
      <dc:date>2022-08-10T17:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201504#M58466</link>
      <description>&lt;P&gt;I tested in 2.9.3 and can confirm that it is messing things up, though slightly different than yours.&lt;/P&gt;&lt;P&gt;I don't get any captialization of the "in(s)", and when I remove the join, nothing changes.&amp;nbsp; It keeps the mucked up code.&lt;/P&gt;&lt;P&gt;Original code (works):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;' '.join(str(i) for i in ([DirectPrefix],[StreetName],[DirectSuffix]) if i)&lt;/LI-CODE&gt;&lt;P&gt;After add join (broken):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;' PublicWorksApps.DBO.teststreets.'.joPublicWorksApps.DBO.teststreets.in(str(i) PublicWorksApps.DBO.teststreets.for i PublicWorksApps.DBO.teststreets.in ([DirectPrefix],[StreetName],[DirectSuffix]) PublicWorksApps.DBO.teststreets.if i)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After remove join (still broken):&lt;/P&gt;&lt;LI-CODE lang="c"&gt;' PublicWorksApps.DBO.teststreets.'.joPublicWorksApps.DBO.teststreets.in(str(i) PublicWorksApps.DBO.teststreets.for i PublicWorksApps.DBO.teststreets.in ([DirectPrefix],[StreetName],[DirectSuffix]) PublicWorksApps.DBO.teststreets.if i)&lt;/LI-CODE&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 18:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201504#M58466</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-08-10T18:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201510#M58468</link>
      <description>&lt;P&gt;Thanks for testing this in 2.9.3!&lt;BR /&gt;FYI: I forgot to mention I'm using 3.0.0.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 18:53:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201510#M58468</guid>
      <dc:creator>Matt-Goodman</dc:creator>
      <dc:date>2022-08-10T18:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201843#M58500</link>
      <description>&lt;P&gt;FYI: I tested this using data from a file geodatabase and some of the behavior was similar, but overall it worked slightly better. The software did corrupt the Python syntax while the join was on, but after the join was removed, it was correctly reverted back to a working expression. The program did&amp;nbsp;&lt;U&gt;not&lt;/U&gt; uppercase the word 'in', and it did successfully revert the expression back to valid Python syntax after the join was removed, but while the join was on, the syntax was bad.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Label expression before the join (labels work as expected):&lt;/P&gt;&lt;LI-CODE lang="python"&gt;' '.join(str(i) for i in ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF], [LST_PREDIR], [LST_NAME], [LST_POSTYP], [LST_POSDIR]) if i)&lt;/LI-CODE&gt;&lt;P&gt;Label expression during the join (labels do not work, bad Python syntax):&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;' adp.'.joadp.in(str(i) adp.for i adp.in ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF], [LST_PREDIR], [LST_NAME], [LST_POSTYP], [LST_POSDIR]) adp.if i)&lt;/LI-CODE&gt;&lt;P&gt;Label expression after the join (labels work again, as expected):&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;' '.join(str(i) for i in ([ANUMBERPRE], [ANUMBER], [ANUMBERSUF], [LST_PREDIR], [LST_NAME], [LST_POSTYP], [LST_POSDIR]) if i)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 12:44:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201843#M58500</guid>
      <dc:creator>Matt-Goodman</dc:creator>
      <dc:date>2022-08-11T12:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201876#M58504</link>
      <description>&lt;P&gt;I have noticed that if I put the join on before the label expression, it works as expected.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 13:54:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1201876#M58504</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2022-08-11T13:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1205249#M58926</link>
      <description>&lt;P&gt;I reported this to Esri and they were able to reproduce the issue and logged it as a bug: BUG-&lt;U&gt;&lt;STRONG&gt;000151759&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 01:55:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1205249#M58926</guid>
      <dc:creator>Matt-Goodman</dc:creator>
      <dc:date>2022-08-23T01:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1380102#M78514</link>
      <description>&lt;P&gt;I'm still having this issue in 3.2.1&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 23:48:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1380102#M78514</guid>
      <dc:creator>AngelBarnett</dc:creator>
      <dc:date>2024-02-08T23:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Pro corrupts my python label expressions when using a table join.</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1472834#M83293</link>
      <description>&lt;P&gt;Also, pop-ups get ruined after using a join on a feature class. When you create the join, ArcPro automatically appends the full SQL database object name (to avoid field name ambiguity), but after removing the join, the pop-up expressions do not remove the preceding database/object path part of the name.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It's a disaster. If you want to apply a join to a featureclass that you use labeling/pop-up expressions on, you're better off just adding a duplicate instance of that feature class to temporarily use for your join operation/work so you don't screw up the layer you depend on.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It can suck an hour to go through and re-fix a single featureclass' complex label expressions and pop-up expressions.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2024 13:43:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/pro-corrupts-my-python-label-expressions-when/m-p/1472834#M83293</guid>
      <dc:creator>Matt-Goodman</dc:creator>
      <dc:date>2024-05-15T13:43:04Z</dc:date>
    </item>
  </channel>
</rss>

