Skip to Content
0

Boolean Logic in script Design Studio

Mar 01 at 09:43 AM

193

avatar image

Hi,

I would like to write a more "complex" IF THEN ELSE script in Design Studio. Something like:

if condition1 and (condition2 or condition) then .... else ...

How can I write it? The standard offers as below. But how can I translate Boolean logic between the expressions?

if ((expression1 == value1) || (expression2 == value2)) {

if_statements

} else {

else_statements

}

Thanks a log.

Jakub

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Tammy Powlas
Mar 01 at 11:05 AM
0

Hello Jakub - I don't believe there are any alternatives right now - see https://archive.sap.com/discussions/thread/3807258

Share
10 |10000 characters needed characters left characters exceeded
Jakub Sadilek Mar 01 at 12:41 PM
0

thanks. I have solved it with an embedded if statement...

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Jakub,

There is no need for an embedded if statement. Complex if then else statements are certainly supported. Here is an example based on the case you have provided above:

var a = ""; 
var b = 3;
var c = 2;
var d = 1;

if ((b==3) && (c==1 || d==1)) 

	{a = "Condition met";} 
	
	else 
	
	{a = "Condition not met";}
	

Regards,

Mustafa.

0