<?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: Advanced Python Labels are not appearing in Map Service. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205214#M15797</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would focus on the following line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #595959; background-color: whitesmoke; border: 0px; font-weight: 300; font-size: 15.9375px; margin: 0px 0px 1.55rem;"&gt; myDataTable = r"&amp;lt;path-to-related-table&amp;gt;"&amp;nbsp;&amp;nbsp; # Path to related table&lt;/PRE&gt;&lt;P&gt;Does the ArcGIS Server account have access to the related table? &amp;nbsp;There's a chance that the rendering logic by a map service can't reach out to another table to draw labels. &amp;nbsp;Are there any logs when the logging level is set to Debug or Verbose?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Sep 2017 17:00:27 GMT</pubDate>
    <dc:creator>JonathanQuinn</dc:creator>
    <dc:date>2017-09-15T17:00:27Z</dc:date>
    <item>
      <title>Advanced Python Labels are not appearing in Map Service.</title>
      <link>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205213#M15796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to assign labels to feature layer using advance python labelling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The label are fetching from feature layer related table using following python script logic, which is given at ESRI Tech Support&amp;nbsp;&lt;A class="link-titled" href="http://support.esri.com/en/technical-article/000012230" title="http://support.esri.com/en/technical-article/000012230" rel="nofollow noopener noreferrer" target="_blank"&gt;How To: Label a related table&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def FindLabel ([keyField], [FirstLabel]):
&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy

&amp;nbsp;&amp;nbsp;&amp;nbsp; key1 = [keyField] # Key field in feature class
&amp;nbsp;&amp;nbsp;&amp;nbsp; key2 = "ID"&amp;nbsp;&amp;nbsp; # Key field in related table
&amp;nbsp;&amp;nbsp;&amp;nbsp; L = [FirstLabel] # Label field in feature class
&amp;nbsp;&amp;nbsp;&amp;nbsp; L2 = "Label2"&amp;nbsp;&amp;nbsp; # Label field in related table
&amp;nbsp;&amp;nbsp;&amp;nbsp; myDataTable = r"&amp;lt;path-to-related-table&amp;gt;"&amp;nbsp;&amp;nbsp; # Path to related table
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; cur = arcpy.da.SearchCursor(myDataTable, [key2, L2])
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cur:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if str(key1) == str(row[0]): 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; L = L + " " + str(row[1])
&amp;nbsp;&amp;nbsp;&amp;nbsp; return L&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The label are appearing in 'ArcMap' &amp;nbsp;window.&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;While publishing the feature layer as a Map Service; I&lt;/SPAN&gt;n the publishing preview window the labels do appear, but not in the finished service.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:09:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205213#M15796</guid>
      <dc:creator>dineshpatil2</dc:creator>
      <dc:date>2021-12-11T10:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Python Labels are not appearing in Map Service.</title>
      <link>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205214#M15797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would focus on the following line:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="" style="color: #595959; background-color: whitesmoke; border: 0px; font-weight: 300; font-size: 15.9375px; margin: 0px 0px 1.55rem;"&gt; myDataTable = r"&amp;lt;path-to-related-table&amp;gt;"&amp;nbsp;&amp;nbsp; # Path to related table&lt;/PRE&gt;&lt;P&gt;Does the ArcGIS Server account have access to the related table? &amp;nbsp;There's a chance that the rendering logic by a map service can't reach out to another table to draw labels. &amp;nbsp;Are there any logs when the logging level is set to Debug or Verbose?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 17:00:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205214#M15797</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-09-15T17:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Python Labels are not appearing in Map Service.</title>
      <link>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205215#M15798</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the related table in the same geodatabase as the feature layer it is associated with? &amp;nbsp;If it is not then the labels will not work, at least that how it was for me so I had to ensure the related table was in the same geodatabase.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Sep 2017 17:35:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205215#M15798</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2017-09-15T17:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Python Labels are not appearing in Map Service.</title>
      <link>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205216#M15799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same issue - I can see the label in ArcMap or in the preview before I publish it as a web service, but cannot see them in ArcGIS Online. I suspect there might be a problem with the path I use in the label expression.&lt;/P&gt;&lt;P&gt;It looks something like this: "Database Connections\TEST.sde\Related_Table". Am I missing something?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I have created a brand new geodatabe, where I put a feature class and a related table I want to get the labels from. In this case my paths looks like that - "C:\Test.gdb\Related_Table". Again, it works fine in ArcMap, but there are no labels after I have published it as a web service?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks heaps in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2018 02:13:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/advanced-python-labels-are-not-appearing-in-map/m-p/205216#M15799</guid>
      <dc:creator>DmitryShatilov</dc:creator>
      <dc:date>2018-09-28T02:13:51Z</dc:date>
    </item>
  </channel>
</rss>

