<?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: List mxd-specific layer field alias names. in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60779#M4863</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;alias name is read and write&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/classes/field.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/classes/field.htm"&gt;Field—ArcPy classes | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the small caveat …&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Updating a field property only updates the field object, no changes are made to the actual field in the table or feature class.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jul 2018 19:46:59 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2018-07-11T19:46:59Z</dc:date>
    <item>
      <title>List mxd-specific layer field alias names.</title>
      <link>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60777#M4861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have written a simple code to list all fields associated with each feature layer in an mxd. I want to inventory the visible fields and field aliases associated with map services.&lt;/P&gt;&lt;P&gt;The field alias that is being returned is the database alias, not the one set in the mxd. Is there any way to get the layer field alias?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;for field in field_list:&lt;BR /&gt; f_name = field.name&lt;BR /&gt; arcpy.AddMessage("&amp;gt; Field Name: "+f_name)&lt;BR /&gt; f_index = field_info.findFieldByName(f_name)&lt;BR /&gt; f_vis = field_info.getVisible(f_index)&lt;BR /&gt; arcpy.AddMessage("&amp;gt; Field Visibility: "+f_vis)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;f_alias = field.aliasName&lt;BR /&gt; &lt;STRONG&gt;arcpy.AddMessage("&amp;gt; Field Alias: "+f_alias)&lt;/STRONG&gt;&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;BR /&gt; f_type = field.type &lt;BR /&gt; arcpy.AddMessage("&amp;gt; Field Type: "+f_type)&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Thank you,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Randy McGregor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 14:45:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60777#M4861</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-07-11T14:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: List mxd-specific layer field alias names.</title>
      <link>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60778#M4862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the&amp;nbsp;mxd field aliases are stored in the mxd document and are not available via arcpy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To illustrate, I created a simple point feature with a field named "FieldName" and gave it an alias of "FieldAlias".&amp;nbsp; I added it to an mxd file.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Alias 1" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/413938_alias1.png" /&gt;&lt;/P&gt;&lt;P&gt;In the mxd file, I changed the field's&amp;nbsp;alias to "MxdAlias".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Alias 2" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/413957_alias2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I examine the feature properties in the data base, the alias still shows as "FieldAlias".&amp;nbsp; However, when I examine the contents of the mxd file, I can see the renamed alias listed along with the original field name.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Alias 3" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/413958_alias3.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 19:25:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60778#M4862</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2018-07-11T19:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: List mxd-specific layer field alias names.</title>
      <link>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60779#M4863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;alias name is read and write&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/classes/field.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/classes/field.htm"&gt;Field—ArcPy classes | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the small caveat …&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Updating a field property only updates the field object, no changes are made to the actual field in the table or feature class.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jul 2018 19:46:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60779#M4863</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-07-11T19:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: List mxd-specific layer field alias names.</title>
      <link>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60780#M4864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I need to read is the layer field alias, rather than the table field alias. I have not been able to do this with Python. Is this possible?&lt;/P&gt;&lt;P&gt;What I'd like to do is send a list of all layers, visible fields and their alias' out, and have people enter the alias they want to see in the map service, so I need info on the layer alias.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Randy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Randy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2018 14:47:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-mxd-specific-layer-field-alias-names/m-p/60780#M4864</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-07-12T14:47:30Z</dc:date>
    </item>
  </channel>
</rss>

