Hello,
I am configuring a popup with information pulled from a related table using the FeatureSetByRelationshipName function. My goal is to show multiple related fields side by side as shown in the attribute table. I set up a table within the HTML popup configuration but am having trouble getting the information to align properly and be placed within its own row. Do I need to be using an array to separate the data into rows or can this be done within the HTML?
Attribute table example:
Common Name - Osprey
Species Name - Pandion Haliaetus
Feature Label - Foraging
Current popup configuration:
The expressions to pull each field of data is the same:
var fs = FeatureSetByRelationshipName($feature,"Coastal Species" , ['COMNAME'], false);
var result = "";
var cnt = Count(fs);
if (cnt > 0) {
// start loop through related records
for (var f in fs) {
// for each f (=feature) in related features, add attendee to the result
result += TextFormatting.NewLine + f.COMNAME;
}
} else {
// overwrite result with text to indicate that there are no attendees
result = "No data";
}return result;
Thanks!
Hi Davidkrady_dep ,
I'm afraid that building an html table from a single Arcade expression is something that has been implemented in ArcGIS Pro, but not yet in the web map. You can achieve this result by using a custom html pop-up and creating an expression for each cell in the table, but multiple calls to retrieve similar information will have an impact on performance.