Hi -
I am still new to Arcade and need some help identifying what is wrong with my below expression. I have 4 questions (see image 1). Question 1 and 4 are answered in all cases. Question 2 and 3 are answered dependent upon another question indicating whether the project is an engineered or natural solution. If they answer Engineered, then they answer Question 2, if they answer Natural, they answer question 3. There is logic that makes the questions editable depending upon the initial response. The response to each question receives a score of 0, 10 or 20. We then give bonus points (Highest Possible Score question in image) based upon how many questions received 20 points using the below logic (image 2). My code does not return a number if any question=20, if they are all < 20 it correctly returns 0. Can anyone tell me what I am doing wrong?
//all highest
if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2ENG_SCORE==20 && $feature.PR_RESF3_SCORE==20) { //All highest - engineering
return 20;
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2NAT_SCORE==20 && $feature.PR_RESF3_SCORE==20) { //All highest - natural
return 20;
//2 of 3 highest
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2ENG_SCORE==20 && $feature.PR_RESF3_SCORE<20) { //RF1 and 2 highest - engineering
return 10;
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2NAT_SCORE==20 && $feature.PR_RESF3_SCORE<20) { //RF1 and 2 highest - natural
return 10;
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2ENG_SCORE<20 && $feature.PR_RESF3_SCORE==20) { //RF1 and 3 highest - engineering
return 10;
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2NAT_SCORE<20 && $feature.PR_RESF3_SCORE==20) { //RF1 and 3 highest - natural
return 10;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2ENG_SCORE==20 && $feature.PR_RESF3_SCORE==20) { //RF2 and 3 highest - engineering
return 10;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2NAT_SCORE==20 && $feature.PR_RESF3_SCORE==20) { //RF2 and 3 highest - natural
return 10;
//1 of 3 highest
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2ENG_SCORE<20 && $feature.PR_RESF3_SCORE<20) { //only RF1 highest - engineering
return 5;
} else if ($feature.PR_RESF1_SCORE==20 && $feature.PR_RESF2NAT_SCORE<20 && $feature.PR_RESF3_SCORE<20) { //only RF1 highest - natural
return 5;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2ENG_SCORE==20 && $feature.PR_RESF3_SCORE<20) { //only RF2 highest - engineering
return 5;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2NAT_SCORE==20 && $feature.PR_RESF3_SCORE<20) { //only RF2 highest - natural
return 5;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2ENG_SCORE<20 && $feature.PR_RESF3_SCORE==20) { //only RF3 highest - engineering
return 5;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2NAT_SCORE<20 && $feature.PR_RESF3_SCORE==20) { //only RF3 highest - natural
return 5;
//None are highest
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2ENG_SCORE<20 && $feature.PR_RESF3_SCORE<20) { //none are highest - engineering
return 0;
} else if ($feature.PR_RESF1_SCORE<20 && $feature.PR_RESF2NAT_SCORE<20 && $feature.PR_RESF3_SCORE<20) { //none are highest - natural
return 0;
}

