HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... If Else
If Else
  View type:
I have a slide with 3 frames (begin, frame1,frame2)
First frame has condition ( textbox has to be entered with the right text)

IF(Condition="'#var1='text'"
CALL(Frame1 .....
ELSE
CALL(Frame2....

I will go constantly to frame 1 , else-function doesnt work?
What do i do wrong?
 
Hi Jos
There is a trick to this kind of scripting which isn't at all obvious.
IF you are writing the code like this..
IF(Condition="'#var1='text'"
CALL(Frame1 .....
ELSE
CALL(Frame2....
It won't work but If you change it just a little to
IF(Condition="'#var1='text'"
CALL(Frame1 .....
ELSE
CALL(Frame2....
Then it does, or should!!
 
 
Sorry Jos, just add a space infront of CALL and it should be OK
 
 
 
Thank you Nickj.
So,my text is right, but i have to add a space in front of CALL. (i see no further difference) How?: with the green arrow i presume.
But if i do so i got the error:
?ACTION: ELSE
 
 
 
 
Put also a space in front of ELSE and what follows.

Like in:
IF ()
>(action)
>ELSE
>>(another action)
>>IF (belongs to 'ELSE'!)
>>>(third action)
>>>ELSE (belongs to second 'IF')
>>>(fourth action)
etc

where '>' is a space.
 
 
 
 
 
No error this time.
But no jump to action (3th frame) under else.
My text:
IF(Condition="'#name='test"")
CALL(Frame='Frame_7.Option='Next Frame')
ELSE
CALL(Frame='FRAME_9'.Option='Specified Frame')
(#name is set by runtime variable name after right clicking the text box)
Where do i go wrong?
 
 
 
 
 
 
I think I found it!
First i switched van char to value (text > 1) this worked.
Then i switched back to char en limited te maximum value length of the field.
Its working fine!

Thankx nickj and Barend!
Subject:
Message options
No additional options