我试图在Oracle规划的计算脚本中使用函数@RETURN。如果“ SGAseason”为1,则应返回错误消息“请再次检查”,否则应将值100赋给“ SGAseasonvalid”。现在,在两种情况下它都返回错误消息。谁知道问题出在哪里/怎么解决?
FIX("FY18" AND "Mar")
"SGAseasonvalid" (
IF("SGAseason" == 1 )
@RETURN("Please check this again", ERROR);
ELSEIF("SGAseason" <> 1 )
100;
ENDIF)
ENDFIX
答案 0 :(得分:0)
您可以使用groovy返回错误消息:
boolean flag = false;
def mbUs = messageBundle( ["validation.forceNegetive": errorMessage
]);
def mbl = messageBundleLoader(["en" : mbUs]);
if(flag == true){
throwVetoException(mbl, "validation.forceNegetive");
}