code: private String limitString() {
          if(params.length != 2){
              throw new IllegalArgumentException("Wrong number of Parameters for limit string expression");
          }
  
          final String field = record.getValueByFieldName(params[0]);
          int limit = Integer.parseInt(params[1]);
  
          if (field.isEmpty() || field.length() < limit){
              return field;
          }
  
          String result = field.substring(0, limit) + "...";
          return result;
      }
docs: Reduce a String to a max limit
  In the config file use:
  fieldName="func(Limit(field,limit))"