I'm trying to create a map label that lists all of the completed surveys. If none of the surveys have been completed, I want that noted; conversely, if all of the surveys have been completed, I want that noted. That way, the surveyor doesn't need to read the whole list of completed surveys.
This is what I have so far:
var JT1 = $feature.JT
var veg1 = $feature.Veg
var plants1 = $feature.Plants
var BUOW1 = $feature.BUOW
var CBB1 = $feature.CBB
var DT1 = $feature.DT
var JD1 = $feature.JD
var JT = IIF(JT1 == "Yes", "JT; ", "");
var veg = IIF(veg1 == "Yes", "Veg; ", "");
var plants = IIF(plants1 == "Yes", "Plants; ", "");
var BUOW = IIF(BUOW1 == "Yes", "BUOW; ", "");
var CBB = IIF(CBB1 == "Yes", "CBB; ", "");
var DT = IIF(DT1 == "Yes", "DT; ", "");
var JD = IIF(JD1 == "Yes", "JD; ", "");
if (JT1 == "Yes" AND veg1 == "Yes" AND plants1 == "Yes" AND BUOW1 == "Yes" AND CBB1 == "Yes" AND DT1 == "Yes" AND JD1 == "Yes"){
return "ALL SURVEYS COMPLETED"
} else if (JT1 != "Yes" AND veg1 != "Yes" AND plants1 != "Yes" AND BUOW1 != "Yes" AND CBB1 != "Yes" AND DT1 != "Yes" AND JD1 != "Yes"){
return "NO SURVEYS COMPLETED"
} else {
return "Completed Surveys: " + JT + veg + plants + BUOW + CBB + DT + JD
}
... but I'm getting the error message:
')' expected.
Thank you in advance!