Select to view content in your preferred language

Relationship in popup not showing after loading a webmap

512
1
12-22-2022 02:32 PM
Alex_Gole
Occasional Contributor

Hi all,

I am having issues loading up relationships' data on popups after loading up a web map. The Feature Layer and the related table are both in the Web Map.

 

 

webmap.when(() => {....
        const featureLayer = webmap.layers.getItemAt(0);
        const flpopup = featureLayer.popupTemplate;
        flpopup.title = "test";
        flpopup.content = [
          // Add FieldContent to popup template.
          {
            type: "fields"
          },
          {
            type: "relationship",
            // The numeric ID value for the defined relationship on the service.
            // This can be found on the service.
            relationshipId: 0,
            description:
              "Test related",
            // Display two related fire features in the list of related features.
            displayCount: 2,
            title: "Test"
          }
        ]
        console.log(flpopup)

 

 

Relationships are supposed to show hereRelationships are supposed to show here

 

Relationships show fine on Enterprise but not here.

Any idea why?

 

Thanks, Alex

0 Kudos
1 Reply
LaurenBoyd
Esri Contributor

Hi @Alex_Gole ,

Where is the webmap and data coming from? Is it displaying relationships from non-hosted services in ArcGIS Enterprise? If that's the case, this is currently not supported. Viewing related records is only supported for ArcGIS Online services and hosted services in ArcGIS Enterprise as outlined in the Note section on the RelationshipContent API reference page.

Lauren
0 Kudos