Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

vchuprina
New Contributor III

How make good scenarios?

I have some problem with operator if ...else if.

If in my script i have inserted "If -operator". For these reason main script doesn't work correctly

Structures of my script:

(1)If (department = 1) then

  N =......

  if a=...  then  (inserted )  

end if

----------------------------------------

(2) Else if (department = 2) then

N =......

  if a=...  then  (inserted )  

.....

--------------------------------------

(3) Else if (department = 3) then

N =......

  if a=...  then  (inserted )  

.....

How use If ... else? Is there any way to control script? Maybe some function like "goto" in C++?


1 Solution

Accepted Solutions
datanibbler
Esteemed Contributor

Re: How make good scenarios?

Hi,

the keywords "ENDIF" close off the IF THEN clause - so any ELSE or ELSEIF elements must be before that.

HTH

Best regards,

DataNibbler

2 Replies
datanibbler
Esteemed Contributor

Re: How make good scenarios?

Hi,

the keywords "ENDIF" close off the IF THEN clause - so any ELSE or ELSEIF elements must be before that.

HTH

Best regards,

DataNibbler

timanshu
Contributor III

Re: How make good scenarios?

Hi,

Can You explain completely about the issue. If it's possible, Kindly attach screenshot/ QVW to show the exact script you are writing.