Remove Blank Rows from a Table Showing Text Responses

From Q
Jump to navigation Jump to search

The following script can be used to remove blank rows in a table that is showing Raw Data from a Text question.

var num_rows = table.numberRows;
var raw_data = table.get('Text');

for (var j = num_rows - 1; j > -1; j--) {
    if (raw_data[j][0] == "")
        table.deleteRow(j);
}

See also