Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sherazade
Contributor III
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

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);

View solution in original post

7 Replies
Anonymous
Not applicable

You are missing the first qoute?

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

sherazade
Contributor III
Contributor III
Author

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);

Anonymous
Not applicable

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

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
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

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

Statement “IF” did not work with fields.