Hello,
I'm hoping someone can help with an issue I'm having. I'm using the new version of the web map for AGOL, and I have a set of lines that are used for inspections for trash assessments. I want end users who use the map to be able to see the information in a related table where the inspections are stored since we want to show historic inspections. This table allows attachments.
I'm able to pull and display the fields and values for each record from the related table in the pop-up when you click on an inspection line, and I'm wondering if there's now a way to use arcade to pull the attachments and display them like they would if you clicked on a feature with attachments (as a small preview of the image at the bottom of the pop-up).
I've tried two variants of pop-up Element expressions, both appear to work in theory, but neither actually display the photo.
version 1:
var child_fs = OrderBy(FeatureSetByRelationshipName($feature, "Marketing_Records"), "InspectionDate DSC")
var child = First (child_fs)
if (child != null){
return {
type: 'attachments',
displayType: 'preview',
}
}
verson 2
var child_fs = OrderBy(FeatureSetByRelationshipName($feature, "Marketing_Records"), "InspectionDate DSC")
var child = First (child_fs)
if (child != null){
type: 'media',
mediaInfos: [
{
//title: 'Street Photo'
type: "image",
value: {
linkURL: 'https://services3.arcgis.com/VrJMZtWUdZkWGXFc/arcgis/rest/services/OVTA_Marketing_Lines/FeatureServe...}'
}
}
]
}
}
I'm hoping the issue is just my inability to effectively write complex expressions since the documentation seems to imply that attachments can be displayed from related tables now.