Select to view content in your preferred language

Using Arcade to Count Related Records - Results inconsistent between ArcGIS Online and ArcGIS Pro

792
0
08-01-2023 09:07 AM
MikeLachance1
New Contributor III

I am trying to use the "FeatureSetByRelationshipName" arcade function in a pop-up in ArcGIS Pro but it fails to return any of the related records. I successfully used this function on the exact same feature layer and related table in ArcGIS Online but for some reason both when I open that web map in Pro and when I try to create a new Arcade expression using this function, it does not produce the same result as it does when viewed in ArcGIS Online. Is this intended design? I was hoping to be able to open the web map and Pro and have that functionality maintained.

Here is the expression:

 

var relatedRecs = FeatureSetByRelationshipName($feature, "R0L0Dev_SitesL1Dev_SiteVisit")
return Count(relatedRecs)

 

 

Even though there are 5 related records tied to the point when I click on the pop-up displays "0".

MikeLachance1_0-1690905735526.png

But in ArcGIS Online, I am able to do everything I want within the pop-up and the information is correct.

MikeLachance1_1-1690906002303.png

Is there something I am doing wrong? Should I be formatting the pop-ups differently in Pro for this function to work correctly? I notice that the relationship name displays differently in the function depending on if it's being used in a webmap (AGOL) or in Pro. Why is that?

 

 

 

0 Replies