After scouring the forums and anything else (since I am just learning this), I have gotten to this place with the below code. I need to return the attribute called "filepath" of the 2nd related record, 3rd related record, etc. I have to do a separate expression for each one, so I can display it is as a URL and Photo in the pop up. I got the first record to work in another expression, but I'm clearly not doing something right here, since this doesn't return anything when I try to get the 2nd or 3rd value.
--------------------------------------------------------------------------------------------------
var index = 0;
var related_table = OrderBy(FeatureSetByRelationshipName($feature,"%vw_EventAttachments"), "AttachmentID");
var filter_query = "EGUID = '" + $feature["EGUID"] + "'";
var related_data_filtered = Filter(related_table, filter_query);
var related_data_filtered_count = Count(related_data_filtered);
var output = "";
for (var row in related_data_filtered) {
if (related_data_filtered_count > 0)
{
index++;
if (index == 2)
return (related_data_filtered).Filepath;
}
else { output = " ";}
return output;
}