I have an Arcade expression that utilizes two different feature services. The first feature service is of some points, with a name field. The second is a feature service from a Survey123 form, which contains all the data I need. I am using both to show all survey records associated to existing set locations in one popup. I managed to use a feature set expression to grab all the survey data and it's displayed how I want. However, since attachments (photos) are allowed, I need these to be shown as well. The arcade expression uses a for-loop to go through each survey and output each by submission. I can only manage to get the links to post on the popup as a string,, but cannot get them to be hyperlinked. Is there a way to get the string to be hyperlinked within my expression, and preserve the format?
Thanks in advance!
var features = FeatureSetByPortalItem(p, "<feature ID>", 0, ['zone_name','maintained_yn', 'maintained_date', 'Maint_Activity','groups_involved', 'notes', 'picture'])
var plot = $feature.Zone_Name
var filterStatement = 'zone_name = @plot' var relatedData = Filter(features, filterStatement)
var relatedDataSorted = OrderBy(relatedData, 'maintained_date ASC')
var popupString = ''
for (var f in relatedDataSorted){
var pic = f.picture
popupString += text(f.maintained_date, 'MM/DD/YYYY') + TextFormatting.NewLine +
"Native Plant Zone: "+f.zone_name + TextFormatting.NewLine +
"Maintained?: " + f.maintained_yn + TextFormatting.NewLine +
"Maintenance Activity: " + f.Maint_Activity + TextFormatting.NewLine +
"Groups Involved: " + f.groups_involved + TextFormatting.NewLine +
"Notes: " + f.notes + TextFormatting.NewLine +
pic + TextFormatting.NewLine + TextFormatting.NewLine
}
return popupString