Count checkbox

@samuel-milanez

When you want to add a number, you need to add. Set the automatic value to be equal to the previous value plus 1, in what you did you told him to update the value to +1 without adding the 1 to the existing value.

By the way for not asking for many times, I set the value to a variable.
Give it a try:

let ask1 = $w(‘#dataset2’).getCurrentItem().ask1,
ask2 = $w(‘#dataset2’).getCurrentItem().ask2,
ask3 = $w(‘#dataset2’).getCurrentItem().ask3,
ask4 = $w(‘#dataset2’).getCurrentItem().ask4;
if ($w(‘#dataset1’).getCurrentItem().ask1 ===ask1) {
$w(‘#dataset2’).setFieldValue(“automatic”,ask1 +1)
}
if ($w(‘#dataset1’).getCurrentItem().ask2 === ask2) {
$w(‘#dataset2’).setFieldValue(“automatic”, ask2+1)
}
if ($w(‘#dataset1’).getCurrentItem().ask3 === ask3) {
$w(‘#dataset2’).setFieldValue(“automatic”,ask3 +1)
}
if ($w(‘#dataset1’).getCurrentItem().ask4 === ask4) {
$w(‘#dataset2’).setFieldValue(“automatic”, ask4 +1)
}

happily
evyatar. israel