Choose Language Hide Translation Bar
Highlighted
CAPEGA
Level I

How can I execute several statements after an if

Hi,

How can I execute several statements after an if liike this:

If( selected == "Option1",
Request = "6";
Table = "Table1"; // ignored? needs to be fixed
Value = "Value1"; // ignored? needs to be fixed
);

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How can I execute several statements after an if

Hi,

 

The commented lines should not be ignored when the IF statement is run.  Please try out the following script and note the result in the Log.  You can experiment by changing x from 5 to 4 in line 2.  Does this help?

Names Default To Here(1);
x=5;
If(x==5,
	Print("This works");
	Print("This also works");
	Print("This works too");
	,
	Print("This shouldn't print");
	Print("Or this");
	Print("This neither");
);

View solution in original post

1 REPLY 1
Highlighted

Re: How can I execute several statements after an if

Hi,

 

The commented lines should not be ignored when the IF statement is run.  Please try out the following script and note the result in the Log.  You can experiment by changing x from 5 to 4 in line 2.  Does this help?

Names Default To Here(1);
x=5;
If(x==5,
	Print("This works");
	Print("This also works");
	Print("This works too");
	,
	Print("This shouldn't print");
	Print("Or this");
	Print("This neither");
);

View solution in original post

Article Labels

    There are no labels assigned to this post.