Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Script condition

Former Member
0 Likes
494

How to use if condition in a window

iam passing some variable to a window and i want to check that variable contains some value then only print some value

but when i do this like

/:IF &VARIABLE1& EQ 1.

*&VARIABLE2&

/:ENDIF.

This window is not at all triggering but if we remove the condition it is triggering the window and displaying the variable2 value

can anyone tell me what is the problem

thank you.

4 REPLIES 4
Read only

varma_narayana
Active Contributor
0 Likes
478

Hi Pradeep..

Try this way.. it will work..

<b>/: IF &VARIABLE1(C)& EQ '1'</b>

  • Value = &VARIABLE2&

/: ENDIF

Note: &VARIABLE1(C)& .. Here (C) will condense the String by removing SPACES.

reward if Helpful.

Read only

Former Member
0 Likes
478

Give the code as follows...

/:IF &VARIABLE1& EQ '1'.

*&VARIABLE2&

/:ENDIF

Read only

Former Member
0 Likes
478

Hi,

try as below

/: IF &var1& IS NOT INITIAL.

AT &var1& . " AT is paragraph format

/:ENDIF.

Read only

Former Member
0 Likes
478

Hi,

IF...ELSE...ENDIF can be used within the layout set to control the flow of logic.

Ex.

/: IF &VBRK-VKORG(2)& EQ 'HG'.

/: DEFINE &PREFIX& = 'Mr.'.

/: ELSE.

/: DEFINE &PREFIX& = 'Mrs.'.

/: ENDIF.

Try like that.

Regards,

Bhaskar