Sum nullable fields

Sum fields that might be blank.

Sometimes you need to sum up fields that don’t always have values. If you want the blank value to be treated as zero, this can be done using the following pattern:

SETRESULT(($number_1 || 0) + ($number_2 || 0) + ($number_3 || 0));

// OR
// SETRESULT(SUM($number_1 || 0, $number_2 || 0, $number_3 || 0));