if (selectAll) {
range.autoFilter(field, null, AutoFilter.FILTEROP_VALUES, null, null);
} else { //partial selection
JSONArray ary = (JSONArray) data.get("criteria");
range.autoFilter(field, ary.toArray(new String[ary.size()]), AutoFilter.FILTEROP_VALUES, null, null);
}
}
}