Hello,
I'm using the FeatureSetByRelationshipName to pull related table records into a popup. One of the fields (SumOfReturnMG) being pulled is an integer field and I need to round the number to 2 decimals. What would be be best way to format the field within my existing Arcade expression?
Expression user below
var fs = FeatureSetByRelationshipName($feature,"qry_HUC_USEGROUP_RET" , ['*'], 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.YearNumber + TextFormatting.NewLine + f.SumOfReturnMG;
}
} else {
// overwrite result with text to indicate that there are no attendees
result = "";
}
return result;
Resulting record (field highlighted in blue)

Thanks.