cancel
Showing results for 
Search instead for 
Did you mean: 

IF condition in script

Former Member
0 Kudos

hi experts,

i need to work based on if condition in script layout. but its not working.

can some one please give some sample code to work with IF...ELSE..conditions in script layout.

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi mytri,

Here is the Example.

/: DEFINE &VAR1& = 'M'.

/: IF &var1& = 'M'

  • The Letter is M

/: ELSE

  • The letter is other than M

/: ENDIF.

Allot points if this is usefull.

Answers (2)

Answers (2)

Former Member
0 Kudos

guys thanks a lot....

problem solved...

Former Member
0 Kudos

Hi Mytri,

IF is used for conditional printing of the text in the output.

The conditional operators that can be used are as follows

= EQ ,< LT,> GT,<= LE ,>= GE,<> NE,

Logical operators: NOT, AND, OR

Example:

/: IF &NAME& = u2019ROBERTu2019

    • He is ROBERT.*

/: ELSEIF &NAME& = u2019JOHNu2019

    • He is JOHN.*

/: ELSE Who is he? &NAME&

/: ENDIF

Regards,

Chandra Sekhar