Hello,
@jcarlson - so close. This arcade expression works great. Thank you very much. However, I have tried several ways to change the return to only display the number of complaints, but I cannot figure it out. This is what the current return looks like:
Since I already have "TotalComplaints" I do not need "total" just the "3". In my various attempts, I either displayed nothing at all or just the word total. But all I want is the number. I tried to manipulate the "total: total" in the return section. I also attempted to delete the "total" in the for loop. No luck as I don't understand it that well obviously. Thank you!
var sum_fields = [
$feature.complaint,
$feature.complaint1,
$feature.complaint2,
$feature.complaint3,
$feature.complaint4,
$feature.complaint5,
$feature.complaint6,
$feature.complaint7,
$feature.complaint8,
$feature.complaint9,
$feature.complaint10
]
var total = 0
for (var s in sum_fields){
If (!IsEmpty(sum_fields[s])){
total += 1
}
}
return {
total: total
}
Solved! Go to Solution.
If this is just in a popup, can you simply do
return total
instead?
If this is just in a popup, can you simply do
return total
instead?