Count Blank Fields in a Section

This example sums up the number of unanswered (blank) fields in a defined section.

var elements = FIELD('section_one').elements;

var blankCount = 0;

for (var i = 0; i < elements.length; i++) {
  if (ISBLANK(VALUE(elements[i].data_name))) {
    blankCount += 1;
  }
}

SETRESULT(blankCount);