As a part of an urban transformation project, I am obliged to create a M-N relationship between the buildings and the exchange table based
based on Analysis Number.
For 1-1 joins the table and the geometry works fine, yet shows only the first record of the table. The data is visible via Identify Tool.
Relate does not work for me because then I cannot reach the data via Identify.
So I tried to create a relationship class between these two entities. The class is completed without any mistakes, however the Identify Tool returns empty. I tried field types of text short integer and double, but no result. I am attaching the files to the post.
Any help will be appreciated.
When you create a relationship class with M-N cardinality, a join table is automatically created as part of the relationship class. The join table will have two columns - the unique key from ICMAL and the unique key from ZEMINKAT. The join table acts as an intermediary between ICMAL and ZEMINKAT linking the records via their unique IDs.
This is where it gets challenging. Because a record in ICMAL can link to zero or more records in ZEMINKAT, and each record in ZEMINKAT can link to zero or more records in ICMAL, ArcGIS does not know how to link records from one object to the other. This means the join table is empty. What you have to do is identify for each unique ID in ICMAL the corresponding unique IDs in ZEMINKAT, and for each unique ID in ZEMINKAT the corresponding unique IDs in ICMAL. This information is used to populate the join table.
These two articles provide methods for populating the join table:
Thank you for the answer. Yet I have another one.
You said "What you have to do is identify for each unique ID in ICMAL the corresponding unique IDs in ZEMINKAT, and for each unique ID in ZEMINKAT the corresponding unique IDs in ICMAL. This information is used to populate the join table." I think it will take forever but I can do this, but how?
Is it more if I ask for further help?
Apologies for the late reply. I got distracted.
Answer to your second question: There's no restriction on the field type used to establish the relationship. Because both tables have to be registered with the geodatabase in order to create a relationship class, many people use the ObjectID field as the unique ID.
Answer to your first question: How to populate the join table is always a challenge. The GeoNet thread Populating a many-to-many relationship class provides a code example. A second method is to create a CSV file with the necessary information and use Append to load it into the join table. You can add the join table to your map by dragging the relationship class into the map.
I noticed in your data that RefName_1 and Text in ZEMINKAT are the same, and they appear to link to ANALIZ_No in ICMAL. It appears you could dissolve the data on RefName_1 and use an ArcMap Relate to link it to ICMAL.