code: function getFirstProperty(fields) {
    return function(record) {
      for (var i = 0; i < fields.length; i++) {
        var fieldValue = record[fields[i]];
  
        if (!_.isEmpty(fieldValue)) {
          return fieldValue[0];
        }
  
      }
  
    };
  
  }
docs: find the first field of record that has a non-empty value that's not already in labelParts