agray1

create joins changes the symbology value field

Discussion created by agray1 on Jan 4, 2012
Latest reply on Jan 5, 2012 by ccposton
Hi there
I have a polygon layer in the map symbolized based on a unique value renderer on a field.  I am adding a join to an in memory table that I create.  When doing so, the value field on the unique value renderer changes to the primary key of the join.  If a join already exists on the table, clearing the join and re-adding it does not do this.  I want the join for labels not symbols.

I assume it has something to do with the name of the field needing to be fully qualified for the renderer.  I am just perplexed that is would change to the primary key of the join (GUID) when the original field was an integer.  Also I need to find a way to reset the field without breaking the renderer.

  
'polyFL is polygon featureture layer in map symbolized on "polytype" field
'table is in memort 
      Dim memRelClassFact As IMemoryRelationshipClassFactory = New MemoryRelationshipClassFactory
      Dim primClass As IObjectClass = DirectCast(DirectCast(polyFL, IDisplayTable).DisplayTable, IObjectClass)
      Dim relClass As IRelationshipClass = memRelClassFact.Open("LayerToTable", primClass, "EggID", lblTab, "EggID", "forward", "backward", esriRelCardinality.esriRelCardinalityOneToOne)

      Dim dispRelC As IDisplayRelationshipClass = DirectCast(polyFL, IDisplayRelationshipClass)
      dispRelC.DisplayRelationshipClass(relClass, esriJoinType.esriLeftInnerJoin)

Outcomes