AnsweredAssumed Answered

Relationship class fields

Question asked by bill@poconogis.com on Aug 31, 2020
Latest reply on Aug 31, 2020 by jborgion

I've create relationship classes but they want to see specific fields as the attribute index. .i.e. See yellow highlighted text. In my case I have points and have about 10 Relationship class tables. They all seem to work properly, but for each attribute table the field value it's showing under "Attributes from xxx" is coming from different fields.  How do I specify which field to use? I'm using a script to create these and the tables are  related all on the same field names. Is there a way to set the fields it uses for this? 

 

 

Attribute links

 

I'm using python to create these, here is my code:

 

tables = arcpy.ListTables()
for i in tables:
    if (i != 'Structure'):
        print(i)

         tab = i
         relClass = i+"_rc"
         forLabel = "Attributes from Table"
         backLabel = "Attributes from " + i
         foreignKey = "equipment_number"
         primaryKey = "PARENT_EQUIPMENT_NUMBER"


         arcpy.CreateRelationshipClass_management(tab,
                                                                                  "StructurePts",
                                                                                  relClass,
                                                                                  "SIMPLE",
                                                                                  forLabel,
                                                                                  backLabel,
                                                                                  "NONE",
                                                                                   "ONE_TO_MANY",
                                                                                  "NONE",
                                                                                  primaryKey,
                                                                                  foreignKey)

Outcomes