Select to view content in your preferred language

Related table in AGOL MapViewer

498
15
Jump to solution
a week ago
doronwen
Frequent Contributor

*** Not sure if this is a known issue or not, but please reroute if needed.

I’ve created a feature layer with a one-to-many relationship to a table in ArcPro (GDB) and moved it to ArcGIS Online using this method. And it worked. In ArcGIS Online, under the hosted feature layer Data > Fields tab, I see the related table I created. I can also see the hosted feature layer and the related table in Map Viewer.

doronwen_0-1736794523342.png

 

But it appears that Map Viewer does not detect the relationship between the hosted feature layer and the table. A user posted this blog which seemed to work in the past, but not anymore – the related table does not show up under the Forms tab.

It would be great to see Map Viewer work seamlessly with related tables, especially with one-to-many relationships and multiple tables. 

0 Kudos
1 Solution

Accepted Solutions
Laura
by MVP Regular Contributor
MVP Regular Contributor

Ah okay. Your question is in the AGOL space instead of Portal. AGOL & Poral will always have different capabilities as AGOL gets the updates first, so keep that in mind when writing future questions. I can move it to the correct board. 

So yes, your issue is that you have an older version of Portal. Related feature behavior is not available until 11.2. You'll have to upgrade or use AGOL. What you are experiencing is expected behavior. 

View solution in original post

15 Replies
RyanUthoff
MVP Regular Contributor

In my experience, you have to manually define the relationship in the Map Viewer (which was not the case with the Classic Map Viewer). Select the parent table in the layers menu and then click the Pop-ups button on the right side. From there, click Add content, and then click Related records. After doing that, it will detect your relationship class and include it in the pop-up in the map viewer.

I'm not sure if that's something you've tried or not, but thought I'd post it in case it helps.

 

RyanUthoff_1-1736799459478.png

 

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

What @RyanUthoff  mentioned does work.

The link you posted as "has worked in the past" is still the proper way to get related records into smart forms.  You do have to manually add them in. 

 

Click on the smart forms for the main layer and add the related records. 

Laura_1-1736802470620.png

 

In my case the layer Gravesites has a relationship to 2 tables. You can also then go and select your related table and click forms to populate the editing form of the related records how you'd like. 

Can you post a picture of what your form looks like?

0 Kudos
EmilyGeo
Esri Contributor

Hi @doronwen

The workflow posted above enables you to navigate related records in the pop-up. 

This article will walk you through configuring forms for editing related records. 

0 Kudos
doronwen
Frequent Contributor

@Laura I do not see that option in my Form  Builder tab:

doronwen_1-1736804591488.png

 

But I see the relationship in the my Content folder, including the Service definition. 
Am I missing any settings? Permission?

 

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

The table is in the map along with the layer right?

0 Kudos
doronwen
Frequent Contributor

@Laura Correct. I have both feature layer and the table in my map. (I think that's what you're asking, sorry)

0 Kudos
Laura
by MVP Regular Contributor
MVP Regular Contributor

Yes. Hm that is not expected behavior..

You added the related record to the pop up too? I'm not really seeing what is wrong. 

Is there data in the table yet? Correct primary and foreign keys for the relationship?

0 Kudos
doronwen
Frequent Contributor

And I see my related field under Content, Data>Fields

 

Table:

doronwen_0-1736806129863.png

Hosted Feature layer:

doronwen_1-1736806156755.png

 

 

0 Kudos
doronwen
Frequent Contributor

Pop-up menu has the same behavior - I do not see the option to add related fields. 

Is there something in the settings I need to change? The hosted feature layer is edit enable. Not sure if that makes any difference.

0 Kudos