Using Arcade to View Photos in a related table via popup

299
2
04-30-2021 04:07 PM
MeleKoneya
Regular Contributor

I'd like to show the photos, if any by a listing in the popup.    I have this so far, but can't get to the photo.

Any suggestions on how to get the related photo as a listing in the popup?

var relatedrecords = FeatureSetByRelationshipName($feature,"COREs_photos")
var cnt = Count(relatedrecords);
var result = "Related records: " + cnt;
if (cnt>0)
{

for (var row in relatedrecords) {
result += TextFormatting.NewLine + row.globalid;
}

}
return result;

Tags (1)
0 Kudos
2 Replies
jcarlson
MVP Regular Contributor

From my experience, getting Arcade to spit out a single URL, to a file or a web page, works just fine.

Returning a series of individual items, however, I don't think can be done. At least, not with a single expression.

- Josh Carlson
Kendall County GIS
0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi @MeleKoneya ,

As @jcarlson mentions an Arcade expression in a web map is not be able to return HTML with multiples hyperlinks (in ArcGIS Pro you can do this).

If the pop-up needs to show multiple attachments, the (New) Map viewer is able to do this. If you have multiple picture attachments they will show up in the pop-up:

XanderBakker_0-1620067522715.png

 

You can enter the settings and switch off the list option to preview the pictures a bit bigger:

XanderBakker_1-1620067588027.png

 

0 Kudos