‎2007 Oct 18 6:06 AM
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.
‎2007 Oct 18 6:09 AM
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.
‎2007 Oct 18 6:10 AM
Give the code as follows...
/:IF &VARIABLE1& EQ '1'.
*&VARIABLE2&
/:ENDIF
‎2007 Oct 18 6:24 AM
Hi,
try as below
/: IF &var1& IS NOT INITIAL.
AT &var1& . " AT is paragraph format
/:ENDIF.
‎2007 Oct 18 8:16 AM
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