public CalculatorMetaFunction(Repository rep, long id_step, int nr) throws KettleException {
    fieldName = rep.getStepAttributeString(id_step, nr, "field_name");
    calcType = getCalcFunctionType(rep.getStepAttributeString(id_step, nr, "calc_type"));
    fieldA = rep.getStepAttributeString(id_step, nr, "field_a");
    fieldB = rep.getStepAttributeString(id_step, nr, "field_b");
    fieldC = rep.getStepAttributeString(id_step, nr, "field_c");
    fieldD = rep.getStepAttributeString(id_step, nr, "field_d");
    fieldE = rep.getStepAttributeString(id_step, nr, "field_e");
    valueType = ValueMeta.getType(rep.getStepAttributeString(id_step, nr, "value_type"));
    valueLength = (int) rep.getStepAttributeInteger(id_step, nr, "value_length");
    valuePrecision = (int) rep.getStepAttributeInteger(id_step, nr, "value_precision");
    removedFromResult = rep.getStepAttributeBoolean(id_step, nr, "remove");
    conversionMask = rep.getStepAttributeString(id_step, nr, "conversion_mask");
    decimalSymbol = rep.getStepAttributeString(id_step, nr, "decimal_symbol");
    groupingSymbol = rep.getStepAttributeString(id_step, nr, "grouping_symbol");
    currencySymbol = rep.getStepAttributeString(id_step, nr, "currency_symbol");

    // Fix 2.x backward compatibility
    // The conversion mask was added in a certain revision.
    // Anything that we load from before then should get masks set to retain backward compatibility
    //
    if (rep.findStepAttributeID(id_step, nr, "conversion_mask") < 0) {
      fixBackwardCompatibility();
    }
  }