Kbase P3282: 4GL. Is it possible to join several IF statements in one uni
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/03/2003 |
|
Solution ID: P3282
GOAL:
4GL. Is it possible to join several IF statements in one unique IF statement?
FIX:
This could never work because we normally do not evaluate the second half of an "AND" if the first half fails. But there are exceptions to this. If the AND is in a WHERE clause, then we have to break up the expression and evaluate it out of order, since some parts are done on the client and others on the server.
This approach is not supported.
Instead of:
FIND FIRST T1 NO-LOCK NO-ERROR.
IF AVAILABLE T1 THEN IF T1.F1 = "TEST" THEN MESSAGE OK.
it is possible to do something similar:
FIND FIRST T1 NO-LOCK NO-ERROR.
IF Available T1 AND T1.F1 = "TEST" THEN Message "OK".