<?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: How does ArcMap decide which field is used for the display expression in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402941#M23139</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I suppose I can create a button in their Add-In we developed that will add the data and create the relate automatically. It just seems that there should be a way to determine the display expression for external tables.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the display field is not exposed in arcpy.mapping. Are you using Python addins?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm"&gt;Layer—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these csv files are updated in-place every night, maybe if these paths can be set up (or copied to) a standard place, you can just add the .lyr ArcMap with your relates and display fields all set up and it will just work. You could tweak the .lyr file just so to hide fields that aren't useful to the user, set up symbology etc. ahead of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In arcpy.mapping often things that aren't exposed can be implemented by setting up a .lyr or .mxd with the properties all set up, and you can just change the source in arcpy.mapping if you have to.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Nov 2017 06:57:36 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2017-11-27T06:57:36Z</dc:date>
    <item>
      <title>How does ArcMap decide which field is used for the display expression</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402938#M23136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have several csv files that are updated by an external organization on a nightly basis. The records from one csv file are used to geocode and create a point FC with python in a fGDB. I can add the csv and point FC to ArcMap and create a Relate in the Properties dialog of the feature class to each of the tables. The end users will then use the Identify tool to inspect features in their zones. When the relationships are expanded, they would like to see values from specific fields so if they want to drill down and see the related records, they can see what they want without having to click on every related record. Instead, they see useless information or sometimes, just a "-1".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have told them about bringing the tables into ArcMap and setting the Display Expression in the table properties. This works in that MXD only. They want to have a .lyr file that they can drag and drop into a new MXD and see the pertinent info. I've tried creating the other tables in the fGDB and creating Relationships there but can not control what is shown in the identify window.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are crime analysts and this is part of their morning routine. Doing their task quickly and efficiently is key. Any ideas?&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="384513" alt="identify window" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/384513_DisplayExpressions1.png" style="height: 567px;" width="363" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 14:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402938#M23136</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2017-11-21T14:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How does ArcMap decide which field is used for the display expression</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402939#M23137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;From:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/understanding-the-display-expression-for-a-field.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/tables/understanding-the-display-expression-for-a-field.htm"&gt;Understanding the display expression for a field—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;The display expression defaults to the first field of string type that contains the text&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #4d4d4d; background-color: #fefefe; font-weight: bold;"&gt;name&lt;/STRONG&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(case insensitive) in the field name. If no name field exists, the display field defaults to the first field of string type, then the first field of integer type, then the first field of any type. You can change the field used in the display expression on the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d; background-color: #fefefe; font-weight: bold;"&gt;Display&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tab of the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d; background-color: #fefefe; font-weight: bold;"&gt;Layer Properties&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4d4d4d; background-color: #fefefe; font-weight: bold;"&gt;Table Properties&lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;dialog box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;I'll try this and see if I can get the results we want.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 14:35:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402939#M23137</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2017-11-21T14:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: How does ArcMap decide which field is used for the display expression</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402940#M23138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So...&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ensured that the ArrestingOfficerName is just ArrestingOfficer and the first field in the csv is my string field with the data I want to see. I then dragged the csv into arcmap and made the Relate, the display expression is set correctly in the identify window. However, if I create a relate to that same table without bringing it into arcmap, I still get the wrong info in the identify window. I tried exporting the csv table into the fGDB and when I set up the relate without bringing into arcmap, the display expression is the OBJECTID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So it seems that the behavior described in the link I posted is only true if the FC or table is brought into arcmap. Not if it is referenced externally in the csv or fGDB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose I can create a button in their Add-In we developed that will add the data and create the relate automatically. It just seems that there should be a way to determine the display expression for external tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HELP!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Nov 2017 15:11:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402940#M23138</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2017-11-21T15:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How does ArcMap decide which field is used for the display expression</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402941#M23139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;I suppose I can create a button in their Add-In we developed that will add the data and create the relate automatically. It just seems that there should be a way to determine the display expression for external tables.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the display field is not exposed in arcpy.mapping. Are you using Python addins?&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/layer-class.htm"&gt;Layer—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If these csv files are updated in-place every night, maybe if these paths can be set up (or copied to) a standard place, you can just add the .lyr ArcMap with your relates and display fields all set up and it will just work. You could tweak the .lyr file just so to hide fields that aren't useful to the user, set up symbology etc. ahead of time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In arcpy.mapping often things that aren't exposed can be implemented by setting up a .lyr or .mxd with the properties all set up, and you can just change the source in arcpy.mapping if you have to.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Nov 2017 06:57:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402941#M23139</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2017-11-27T06:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: How does ArcMap decide which field is used for the display expression</title>
      <link>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402942#M23140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then its a good thing I'm using ArcObjects for the addin. I wrote code to add a new point fc, tables, and a function to add the relationships. I tried to keep the two systems apart, but they said it was ok to put them in the same place. This allowed me to be able to set def queries, relationships and change source csv files with radio buttons and check boxes.&lt;/P&gt;&lt;P&gt;The relationships were tricky to figure out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Function createRelationsip(ByVal pTable As ITable, ByVal strJnFieldTbl As String, ByVal pLayer As IFeatureLayer, ByVal strJnFieldLyr As String, ByVal relName As String, ByVal fwdLabel As String, ByVal card As esriRelCardinality) As IRelationshipClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pMemRelFact As IMemoryRelationshipClassFactory = New MemoryRelationshipClassFactory()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pTableOC As IObjectClass = pTable
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pLayerOC As IObjectClass = pLayer.FeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRelClass As IRelationshipClass = pMemRelFact.Open(relName, pTableOC, strJnFieldTbl, pLayerOC, strJnFieldLyr, fwdLabel, "backward", esriRelCardinality.esriRelCardinalityOneToMany)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRelClassCollEdit As IRelationshipClassCollectionEdit = CType(pLayer, IRelationshipClassCollectionEdit)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRelClassCollEdit.AddRelationshipClass(pRelClass)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return pRelClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Function
‍‍‍‍‍‍‍‍‍

&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub removeRelationship(ByVal pLayer As IFeatureLayer, ByVal relClass As IRelationshipClass)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pRelClassCollEdit As IRelationshipClassCollectionEdit = CType(pLayer, IRelationshipClassCollectionEdit)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pRelClassCollEdit.RemoveRelationshipClass(relClass)
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

&amp;nbsp; ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:22:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-does-arcmap-decide-which-field-is-used-for-the/m-p/402942#M23140</guid>
      <dc:creator>MichaelKohler</dc:creator>
      <dc:date>2021-12-11T18:22:11Z</dc:date>
    </item>
  </channel>
</rss>

