// Acess 'Groundwater Levels Monthly Mean' table as a FeatureSet
var portal = Portal("https://fis-ocha.maps.arcgis.com/")
var cities = FeatureSetByPortalItem(portal,
"0218468f0d8f40daa9b5aa79b88ca961", 1, ['admin4_en2',
'primary_destination', 'parentglobalid'])
// Filter related features by using a common attribute
var globalid = $feature.globalid
var filterStatement = 'parentglobalid = @globalid'
// Related features as a variable
var relatedData = Filter(cities, filterStatement)
// Build the pop-up string by iterating through all related features
var popupString = ''
for (var f in relatedData){
popupString +=
"Secondary City: " +
DefaultValue(f.admin4_en2, 'no data')
}
return popupString
var p = Portal("https://www.arcgis.com")
var cities = FeatureSetByPortalItem(p, "0218468f0d8f40daa9b5aa79b88ca961", 1, ['admin4_en2', 'primary_destination', 'parentglobalid'])