Can't add relationship class to map?

245
4
Jump to solution
07-28-2021 07:18 AM
Labels (2)
E_A_Bloomquist
New Contributor II

Hi all,

I'm trying to include a relationship class in a map, so it'll be included when I publish the map to AGOL as a hosted feature layer.  But when I right-click on the relationship class in the ArcGIS Pro catalog, the "Add To Current Map" option is grayed out.

Anybody have any ideas about what I might be doing wrong?  Is there some detail about creating the relationship class that I might have missed?   The layers referenced in the relationship class are already in the map.

Edited to add:  When I try to just drag the relationship class from the catalog to the map, it says "Failed to add data ... The table was not found".

Thanks.

0 Kudos
1 Solution

Accepted Solutions
RPGIS
by
Regular Contributor

No, it is something that is honored despite not being able to directly see the relationship that you created in the map. If you already have the features that participate in the relationship in the map currently, then you should be able to test it by selecting the feature and viewing the attributes. It should look something like this:

Example AGO.JPG

The relationship is stored in the database; it is something that cannot be added to the map directly.

View solution in original post

4 Replies
RPGIS
by
Regular Contributor

Typically when you create a relationship class, you would add both tables/features to the map for publishing. I've done this on multiple occasions.

I don't know how your relationship is set up, but depending on how it is setup, you will need to add all of the tables/features that participate in that relationship(s).

For instance, I have a sample where I have multiple features relating to a single standalone table.

  • All of the features plus the standalone table are brought into a single map.
  • From the standalone map, I publish everything as is (the relationship will still be honored despite the user not seeing it).

So doing this should give you what you need.

E_A_Bloomquist
New Contributor II

Both of the feature layers the relationship class was created with were already in the map.  Don't I need to add the created relationship class to the map as well?  That's where I'm running into an issue.  

When I right-click on the relationship class in the catalog, the "Add To Current Map" option is grayed out.  (The "Add To New" submenu is there, but all of the options under that submenu are grayed out.)

And as noted, trying to simply drag the relationship class to the map fails as well - "The table was not found".


0 Kudos
RPGIS
by
Regular Contributor

No, it is something that is honored despite not being able to directly see the relationship that you created in the map. If you already have the features that participate in the relationship in the map currently, then you should be able to test it by selecting the feature and viewing the attributes. It should look something like this:

Example AGO.JPG

The relationship is stored in the database; it is something that cannot be added to the map directly.

View solution in original post

E_A_Bloomquist
New Contributor II

Okay, I see now that the relationship does follow when published to a web layer on AGOL.  

Thank you.

0 Kudos