Can't view "Related Records" option using a webservice

1328
24
11-02-2023 12:13 PM
Labels (1)
BrianBulla
Occasional Contributor III

Hi,

I'm trying to show related records in a pop-up.  According to this blog ( https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/rolling-out-related-records-in-map... ) article, I should be able to do this, but for some reason I do not have the option to "Add Content - Related Records".  See screenshot below.  Can anyone explain what might be going wrong here??

BrianBulla_0-1698952291321.png

 

Here are the details on the webservice I am using.  I can view the features, and modify the features fields in the pop-up.  Just no access to the related table for some reason.

 

 

 

ArcGIS REST Services DirectoryLogin | Get Token
Home > services > Works > Valves_Over_Inspections (MapServer)Help | API Reference
JSON | SOAP

Works/Valves_Over_Inspections (MapServer)

View In:   ArcGIS JavaScript   ArcGIS Online Map Viewer   ArcGIS Earth   ArcMap   ArcGIS Pro

View Footprint In:   ArcGIS Online Map Viewer

Service Description:

Map Name: Valves Over Inspections

Legend

All Layers and Tables

Dynamic Legend

Dynamic All Layers

Layers:Tables:Description:

Copyright Text:

Spatial Reference: 26917  (26917)


Single Fused Map Cache: false

Initial Extent:
      XMin: 670900.4892873524

      YMin: 4861540.759367962

      XMax: 671264.1504525405

      YMax: 4861797.333926209

      Spatial Reference: 26917  (26917)

Full Extent:
      XMin: 632250.5783000002

      YMin: 4845167.040200001

      XMax: 706521.8962000003

      YMax: 4932435.0529

      Spatial Reference: 26917  (26917)

Units: esriMeters

Supported Image Format Types: PNG32,PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,BMP

Document Info:
      Title: Map

      Author:

      Comments:

      Subject:

      Category:

      Keywords:

      AntialiasingMode: Fast

      TextAntialiasingMode: Force

Supports Dynamic Layers: true

MaxRecordCount: 2000

MaxImageHeight: 4096

MaxImageWidth: 4096

Supported Query Formats: JSON, geoJSON, PBF

Supports Query Data Elements: true

Min Scale: 0

Max Scale: 0

Supports Datum Transformation: true



Child Resources:   Info   Dynamic Layer

Supported Operations:   Export Map   Identify   QueryDomains   QueryLegends   Find   Return Updates
0 Kudos
24 Replies
KenBuja
MVP Esteemed Contributor

Do you have a relationship set up with that specific layer? If you click on the "Valves Over Inspected" layer, does that page contain a list of relationships? For example, this layer has several relationships set up.

relationships.png

0 Kudos
BrianBulla
Occasional Contributor III

Yes, both the Valves Over and the Valves Under have a related table:

BrianBulla_0-1699013871169.png

 

0 Kudos
ArmstKP
Occasional Contributor III

@BrianBulla @KenBuja  Related records from ArcGIS Server services are still not supported in the map viewer, surprisingly and unbelievably!  You still have to use the classic map viewer to do so.

ArmstKP_1-1698958903499.png

 

 

KenBuja
MVP Esteemed Contributor

I can view related records in a popup using the Map Viewer. For example, using the service in my previous message, I built a popup to show the information from a related table.

var rec = First(FeatureSetByRelationshipName($feature, "DCGIS.ITSPE", ['BIDNAME', 'BIDTOTALDUE', 'BIDCOLLECTED', 'BIDBALANCE']));
if (IsEmpty(rec.BIDNAME)) return 'Not a BID';
return `${rec.BIDNAME}
    • Total Due: ${Text(rec.BIDTOTALDUE, '$#,###.00')}
    • Collected: ${Text(rec.BIDCOLLECTED, '$#,###.00')}
    • Balance: ${Text(rec.BIDBALANCE, '$#,###.00')}`

related.png

ArmstKP
Occasional Contributor III

@KenBuja Sure, you have to use arcade expressions to do so, but then the related records aren't interactive like they are with hosted feature layers (below):

ArmstKP_0-1698960634789.png

 

 

BrianBulla
Occasional Contributor III

Hi Ken,

Just troublehsooting this now, and even the Arcade is not working.  So with your example, when you're in the AGOL webmap and you click on "Tables" on the left hand side, do you see all of your related tables available?  In mine I see nothing.  But maybe related tables don't show up here anyways....I'm just curious.

BrianBulla_0-1699018219518.png

 

0 Kudos
by Anonymous User
Not applicable

.

0 Kudos
BrianBulla
Occasional Contributor III

Yes, this is what I experience too.

0 Kudos
KenBuja
MVP Esteemed Contributor

You can add a related table to your map, using the Add button in the upper left and using the URL of your table layer.