$('tr:not(.crm-search-builder-add-row)', block).each(function(rowNo) {
var row = $(this);
if ($('select:first', row).val() === '') {
$('tr:not(.crm-search-builder-add-row)', block).each(function(rowNo) {
var row = $(this);
if ($('select:first', row).val() === '') {