substitute([path];[sourceFolder];[targetFolder])&"\"&[short_filename] - This formula throws an error message

org.pentaho.reporting.libraries.formula.ContextEvaluationException: LibFormulaErrorValue{errorCode=502, errorMessage=Invalid Argument}


if I hard code [sourceFolder] and [targetFolder] it works fine. Is this a known bug ? I am using spoon 4.1.0 stable version.