4 Replies Latest reply: Jun 13, 2014 6:32 AM by Eddie Dalley RSS

    Can IF..THEN.....ELSE...ENDIF control statements be nested in QlikView

      Question: Can IF..THEN.....ELSE...ENDIF control statements be nested in QlikView.

       

      I am trying to catch an error, and take actions depending on criteria

       

      basics of script are:

       

      IF condition1 THEN

           IF Condition2 THEN

                Do one thing here - eg. handle error and continue

           ELSE

                Do something else here - eg exit script

           ENDIF

      ELSE

           Do something else here

      ENDIF

      What appears to happen is that when condition 1 in the outer IF is not met, the ELSE from the Inner IF is executed rather than the ELSE for the outer IF

      Capture.PNG.png