February 02, 2007, 01:57 PM
thebrettdThen clause missinterpreted as a label
I am creating a define field TEST/i1 (A single integer either 0 or 1) to be used as the condition to test upon in an if statement later in the report.
It uses an IF THEN ELSE IF construct to set its value. However, webFOCUS is trying to interpret the THEN 1 as a label, and since there is no label 1 I get thet error code:
(FOC305) SPECIFIED LABEL NOT FOUND: 1 .
If I change the type to A1 and 'Y' or 'N' flags, it still complains that there is no 'Y' label.
TST1/I1 = IF (POSITON_CODE EQ '4222' AND STUDENT_CLASSIFICATION EQ 'GP' OR 'UP') THEN 1
- ELSE IF (POSITON_CODE GE '4479' AND POSITON_CODE LE '4482' AND STUDENT_CLASSIFICATION EQ 'UP') THEN 1
- ELSE IF (POSITON_CODE EQ '4009' OR '4222' OR '4475' OR '4495' OR
- '4479' OR '4480' OR '4481' OR '4482' OR
- '0070' OR '0074' OR '0075' OR '0076' OR
- '0077' OR '0078' OR '0079' OR '0090' OR '0095') THEN 0
- ELSE IF SHRT EQ '1' THEN 0 ELSE 1;
Is there something wrong with my IF THEN ELSE?
February 02, 2007, 02:11 PM
smithsRemove the dashes at the beginning of the line. You are not in Dialog Manager mode.
February 02, 2007, 02:27 PM
thebrettdThanks.
I guess I was confused because I DO have to use the - when I am building an IF THEN ELSE outside of a define (when I am using SET e.g)
February 02, 2007, 02:45 PM
smithsThat's correct.
The syntax differs between DM and DEFINE FILE.
Regards,
Sean