Hi @KenBuja ,
No, it gives the following error "Execution error - Line: 15, 7: Invalid parameter"
But, I tried a workaround with an attribute rule and it gives me what I need. The code for the attribute rule is:
"
var countNo = 0;
if ($feature.Q1_1 == 'No') {
countNo += 1;
}
if ($feature.Q1_2 == 'No') {
countNo += 1;
}
if ($feature.Q1_3 == 'No') {
countNo += 1;
}
if ($feature.Q1_4 == 'No') {
countNo += 1;
}
if ($feature.Q2_1 == 'No') {
countNo += 1;
}
if ($feature.Q2_2 == 'No') {
countNo += 1;
}
if ($feature.Q3_1 == 'No') {
countNo += 1;
}
if ($feature.Q3_2 == 'No') {
countNo += 1;
}
if ($feature.Q3_3 == 'No') {
countNo += 1;
}
if ($feature.Q3_4 == 'No') {
countNo += 1;
}
if ($feature.Q3_5 == 'No') {
countNo += 1;
}
if ($feature.Q3_6 == 'No') {
countNo += 1;
}
if ($feature.Q3_7 == 'No') {
countNo += 1;
}
if ($feature.Q3_8 == 'No') {
countNo += 1;
}
if ($feature.Q3_9 == 'No') {
countNo += 1;
}
if ($feature.Q3_10 == 'No') {
countNo += 1;
}
if ($feature.Q3_11 == 'No') {
countNo += 1;
}
if ($feature.Q4_1 == 'No') {
countNo += 1;
}
if ($feature.Q4_2 == 'No') {
countNo += 1;
}
if ($feature.Q4_3 == 'No') {
countNo += 1;
}
if ($feature.Q4_4 == 'No') {
countNo += 1;
}
if ($feature.Q4_5 == 'No') {
countNo += 1;
}
if ($feature.Q4_6 == 'No') {
countNo += 1;
}
if ($feature.Q5_1 == 'No') {
countNo += 1;
}
if ($feature.Q5_2 == 'No') {
countNo += 1;
}
if ($feature.Q5_3 == 'No') {
countNo += 1;
}
if ($feature.Q5_4 == 'No') {
countNo += 1;
}
if ($feature.Q5_5 == 'No') {
countNo += 1;
}
if ($feature.Q5_6 == 'No') {
countNo += 1;
}
if ($feature.Q5_7 == 'No') {
countNo += 1;
}
if ($feature.Q6_1 == 'No') {
countNo += 1;
}
if ($feature.Q6_2 == 'No') {
countNo += 1;
}
if ($feature.Q6_3 == 'No') {
countNo += 1;
}
if ($feature.Q6_4 == 'No') {
countNo += 1;
}
if ($feature.Q6_5a == 'No') {
countNo += 1;
}
if ($feature.Q6_5b == 'No') {
countNo += 1;
}
if ($feature.Q6_5c == 'No') {
countNo += 1;
}
if ($feature.Q6_5d == 'No') {
countNo += 1;
}
if ($feature.Q6_5e == 'No') {
countNo += 1;
}
if ($feature.Q6_5f == 'No') {
countNo += 1;
}
if ($feature.Q6_5g == 'No') {
countNo += 1;
}
if ($feature.Q6_5h == 'No') {
countNo += 1;
}
if ($feature.Q6_5i == 'No') {
countNo += 1;
}
if ($feature.Q6_6 == 'No') {
countNo += 1;
}
if ($feature.Q6_7a == 'No') {
countNo += 1;
}
if ($feature.Q6_7b == 'No') {
countNo += 1;
}
if ($feature.Q6_8 == 'No') {
countNo += 1;
}
if ($feature.Q6_9 == 'No') {
countNo += 1;
}
if ($feature.Q6_10 == 'No') {
countNo += 1;
}
if ($feature.Q6_11 == 'No') {
countNo += 1;
}
if ($feature.Q6_12 == 'No') {
countNo += 1;
}
if ($feature.Q6_13 == 'No') {
countNo += 1;
}
if ($feature.Q6_14 == 'No') {
countNo += 1;
}
if ($feature.Q6_15 == 'No') {
countNo += 1;
}
if ($feature.Q7_1 == 'No') {
countNo += 1;
}
if ($feature.Q7_2 == 'No') {
countNo += 1;
}
if ($feature.Q7_3 == 'No') {
countNo += 1;
}
if ($feature.Q7_4 == 'No') {
countNo += 1;
}
if ($feature.Q7_5 == 'No') {
countNo += 1;
}
if ($feature.Q7_6 == 'No') {
countNo += 1;
}
if ($feature.Q7_7 == 'No') {
countNo += 1;
}
if ($feature.Q7_8 == 'No') {
countNo += 1;
}
if ($feature.Q7_9 == 'No') {
countNo += 1;
}
if ($feature.Q7_10 == 'No') {
countNo += 1;
}
if ($feature.Q7_11 == 'No') {
countNo += 1;
}
if ($feature.Q7_12 == 'No') {
countNo += 1;
}
if ($feature.Q7_13 == 'No') {
countNo += 1;
}
if ($feature.Q7_14 == 'No') {
countNo += 1;
}
if ($feature.Q7_15 == 'No') {
countNo += 1;
}
if ($feature.Q7_16 == 'No') {
countNo += 1;
}
if ($feature.Q7_17 == 'No') {
countNo += 1;
}
if ($feature.Q7_18 == 'No') {
countNo += 1;
}
if ($feature.Q7_19 == 'No') {
countNo += 1;
}
if ($feature.Q7_20 == 'No') {
countNo += 1;
}
if ($feature.Q7_21 == 'No') {
countNo += 1;
}
if ($feature.Q7_22 == 'No') {
countNo += 1;
}
if ($feature.Q8_1 == 'No') {
countNo += 1;
}
if ($feature.Q8_2 == 'No') {
countNo += 1;
}
if ($feature.Q8_3 == 'No') {
countNo += 1;
}
if ($feature.Q8_4 == 'No') {
countNo += 1;
}
if ($feature.Q8_5 == 'No') {
countNo += 1;
}
if ($feature.Q8_6 == 'No') {
countNo += 1;
}
if ($feature.Q8_7 == 'No') {
countNo += 1;
}
if ($feature.Q8_8 == 'No') {
countNo += 1;
}
if ($feature.Q9_1 == 'No') {
countNo += 1;
}
if ($feature.Q9_2 == 'No') {
countNo += 1;
}
if ($feature.Q9_3 == 'No') {
countNo += 1;
}
if ($feature.Q10_1 == 'No') {
countNo += 1;
}
if ($feature.Q10_2 == 'No') {
countNo += 1;
}
if ($feature.Q10_3 == 'No') {
countNo += 1;
}
if ($feature.Q10_4 == 'No') {
countNo += 1;
}
if ($feature.Q10_5 == 'No') {
countNo += 1;
}
return countNo;"