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

if condition..

Former Member
0 Likes
546

Hi,

I have a requirement like below I have 1 check box and 1 radio button

Check box

Radio button

Suppose if I select only radiobutton one functionality has to happen, and if I select radio button & check box one functionally has to happen how to write the if condition.

akshitha.

5 REPLIES 5
Read only

suresh_datti
Active Contributor
0 Likes
509

Why don't you have two checkboxes instead?

if p_chk1 eq 'X' and p_chk2 eq space.

  • do something

elseif p_chk1 eq 'X' and p_chk2 eq 'X'.

  • do something else.

endif.

~Suresh

Read only

Former Member
0 Likes
509
IF RB1 = 'X' and CB = ' '.

PERFORM OPERATION1.

ENDIF.

IF RB1 = 'X' and CB = 'X '.

PERFORM OPERATION2.

ENDIF.

In ur query u need to understand that

Check box can be one

Radiobutton's will be two(minimum in a group ) and u need to write RB1 or RB2 depending on the condition .

regards,

Vijay

Read only

Former Member
0 Likes
509

HI,

IF RD1 eq 'X'.

UR code....(for radio button ticked)

ENDIF.

IF RD1 EQ 'X' and RC1 EQ 'X'.

UR code..(.for radio button and check box both were ticked)

Endif.

KIshore.

Read only

Former Member
0 Likes
509

hai akshitha...

try this...and let me know the result...

IF IF P_CHECK = 'X' AND P_RAD = 'X'.

WRITE YOUR FUNCTIONALITY IN A PERFORM.

ELSEIF P_CHECK = 'X'.

WRITE THE OTHER FUNCTIONALITY HERE

ENDIF.

But u can not create a radiobutton group with a single radio button... u shuld have atleast 2 radiobuttons in a group...... Check it once..

Suresh......

Read only

former_member189631
Active Contributor
0 Likes
509

Hi Akshtha,

Implement ur Requirement on this Logic.

if ( P_chk1 = 'X' OR P_chk2 = 'X' ) AND P_OPT <> 'X'.

"Ur code when only chk1 or chk2 checked.

endif.

if ( P_chk1 = 'X' OR P_chk2 = 'X' ) AND P_OPT = 'X'.

"Ur code when only chkbox and option is checked.

endif.

Regards,

Ramganesan K.