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".
But in ArcGIS Online, I am able to do everything I want within the pop-up and the information is correct.
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?