You may have heard/used this new feature in Planning 126.96.36.199 version
@RETURN can exit the calculation with customized error messages and levels.
So I tried to explore this functionality together with Data validation in 188.8.131.52 (Sample Planning application is used to demonstrate this).
Negative values are not entertained for FY10.
So user entered a -ve value and he got a validation message saying negatives are not allowed in the system.
He accidently ran the rule which allocates the entered value.
I’ve used @RETURN to exit the calculation with a custom error message which will guide the user to the co-ordinate where -ve value is entered.
Script used to acheive this:
@RETURN(@CONCATENATE(@CONCATENATE(@CONCATENATE(@CONCATENATE(“The violation of data integrity :
Period [“, @NAME(@CURRMBR(“Period”))),”] -> Entity [“), @NAME(@CURRMBR(“Entity”))),”]
has a negative expenses. Calculations are interrupted”), ERROR);
Even though RETURN allow you to set 3 levels (INFO, WARNING, ERROR), I’ve seen that only ERROR can send the message indicated in the ErrorMessage string to the client and the application log.
This is the screen that you get when you use WARNING or INFO level. (It’ll not send the string)
RETRUN is also available in 11.1.2 Planning, however to view the custom error message (ERROR) you’ll have navigate to the Tools -> Job Console.
However , you cannot see WARNING, INFO level ErrorMessage in both the versions.