2

I am trying to use function @RETURN in the calculation script in Oracle planning. It should return error message "Please check this again" if "SGAseason" is 1, otherwise should give value 100 to "SGAseasonvalid". By now it returns error message in BOTH cases. Anyone know what is the issue / how to go around?

FIX("FY18" AND "Mar")

"SGAseasonvalid" (

IF("SGAseason" == 1 )

@RETURN("Please check this again", ERROR);

ELSEIF("SGAseason" <> 1 )

100;

ENDIF)

ENDFIX
vmg
  • 4,176
  • 2
  • 20
  • 33
Jullis
  • 21
  • 1

1 Answers1

0

You can use groovy for returning error messages:

boolean flag = false;
def mbUs = messageBundle( ["validation.forceNegetive": errorMessage
                          ]);
def mbl = messageBundleLoader(["en" : mbUs]);
if(flag == true){
    throwVetoException(mbl, "validation.forceNegetive");
}