Skip to Content

Boolean Logic in script Design Studio

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 01 at 11:05 AM

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

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 01 at 12:41 PM

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

    Add comment
    10|10000 characters needed 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.