Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sherazade
New Contributor III

msgbox help needed!

I cannot understand why this script is not working.... in both cases returns the else content!

help please!

Load

MsgBox('question?', 'title', 'YESNO', 'ICONQUESTION') as YE

autogenerate 1;

if YE =6 then

  bla bala case Ye=6 (yes)

else

otherwise bla bla  ye=7

end if

1 Solution

Accepted Solutions
Not applicable

msgbox help needed!

Hi. Try like this:

Load

MsgBox('ANALIZZO ANNO IN CORSO?', 'ANNO ANALISI', 'OKCANCEL', 'ICONQUESTION') as Y

autogenerate 1;

let vY=Peek('Y');

if $(vY)=1 then;

trace yes;

else

trace no;

end if;

trace $(MyMessage);

7 Replies
dennisnet
Valued Contributor III

msgbox help needed!

You are missing the first qoute?

MsgBox(  '      question?' .........

sherazade
New Contributor III

msgbox help needed!

no this was a stupid error copying.... origanl script is:

Load
MsgBox('ANALIZZO ANNO IN CORSO?', 'ANNO ANALISI', 'OKCANCEL', 'ICONQUESTION') as Y
autogenerate 1;
if Y=1 then;
trace yes;
else
trace
no;
end if;
trace $(MyMessage);

dennisnet
Valued Contributor III

msgbox help needed!

I am not sure what the trace part is for but from the look of it I would say that the  " ; " behind then should not be there.

Not applicable

msgbox help needed!

Hi. Try like this:

Load

MsgBox('ANALIZZO ANNO IN CORSO?', 'ANNO ANALISI', 'OKCANCEL', 'ICONQUESTION') as Y

autogenerate 1;

let vY=Peek('Y');

if $(vY)=1 then;

trace yes;

else

trace no;

end if;

trace $(MyMessage);

sherazade
New Contributor III

msgbox help needed!

no Dennis, this statement is correct:

trace Main table loaded;
trace $(MyMessage);

(try this example in a script and it will write "Main table Loaded" in the Script Execution Progress popup window...)

what I do not understand is whatever button I press it uses the else part, even if the variable is correct!

sherazade
New Contributor III

msgbox help needed!

Thanks a lot it works....

PS  if you have time can you please tell me why??? I was copying help and didn't go... your Peek does it!!!!!!!!!!!!!!

Not applicable

msgbox help needed!

Statement “IF” did not work with fields.

Community Browser