Friday, December 30, 2011

Exit sub for @formula is @return

Basically We confused for many times because handling the @formula...

When we are executing the @if commands there will some problem we will get ...

@if(
@isnull(fieldName)
@prompt(1;"Alert";"Field is Null");
@prompt(1;"Alert";"Field is Not Null")
);
@prompt(1;"";"Here will be executed when the @if command finished");
.................
.................
.................

After executing the @if condition, @formulas never bother about condition falls True or False. It continues the execution...

Here we can handle the situation using @return command.

Example:

@if(
@isnull(fieldName)
@return(@prompt(1;"Alert";"Field is Null"));
@prompt(1;"Alert";"Field is Not Null")
);
@prompt(1;"";"Here will be executed when the @if command finished");
.................
.................
.................

Here If the Validation returns "Field is Null", It does not continues the execution...

No comments:

Post a Comment