Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have this if structure in my qvd generator qvw file
if vAction=0 then
if ...
else
.....
End If
if......
else
end if
End if
if vAction=-1 then
if ...
else
.....
End If
if......
else
end if
End if
let's will said that vAction=-1, it should jump to the second condition but i don't know why it's continuing in the else inside the false condition (3rd line in example structure)
i've checked the code and the structure a lot of times but i cant find why it happening this...
what could be the problem??
switch vAction
case 1
script
case -1
script
default
script
end switch
Fabrice
Use if vAction -=1 then
hi Manish i'm using it already,
What you have is two completely separate Nested If statements, so it is working correctly. Your line three is running when Lines 1 and 2 have evaluated false and because it is an else statement runs for any value not already caught by lines 1 and 2. Depending on what you need to do, you need to re-structure your statements.
flipside
Carlos,
Are you sure about the value of vAction ? You can nest several if statements without any problem.
Did you trace it through the debugger ?
Fabrice
hi flipside,
i need to run several if conditions depending of a bigger condition (vAction) something like a case statement
simplifying the question...
how i could do a case statement in Qlikview?
switch vAction
case 1
script
case -1
script
default
script
end switch
Fabrice