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

Issue with smartform condition element

bala_krishna007
Participant
0 Likes
735

Hello Every one,

I want to achieve  the below condition in smartform condition element

IF  ( WHNO = '122' OR  WHNO = '123' OR WHNO  = '112' )  and ( v_flag = 'x')

do some processing .

endif.

I had used a condition element and in the genneral attributes tab I placed condition as whno = 122 or whno = 123 or whno = 112  and when I write v_flg = 'X' it is evaluating as

IF  WHNO = '122' OR  WHNO = '123' OR  ( WHNO  = '112'   and  v_flag = 'x' ).


Please suggest how can I acheive my logic.


Thanks,

Balu

1 ACCEPTED SOLUTION
Read only

Patrick_vN
Active Contributor
0 Likes
704

By heart I think you'll have to repeat every check, so:

W=112

F=X

OR

W=123

F=X

OR

W=112

F=X

4 REPLIES 4
Read only

SimoneMilesi
Active Contributor
0 Likes
704

Mixing AND / OR condition in SF is a bit tricky.

A more easy and "readable" solution is:

  1. Create a Folder  and put it under condition v_flag = 'X'.
  2. In the folder put your element with the WHNO OR conditions

In this way, you enter the OR conditions only if V_flag = 'X'.

it will become something like

IF v_flag = 'X'.

     IF WHNO  = 122 OR whno = 123 OR whno = 112.

     ENDIF

ENDIF.

Read only

Patrick_vN
Active Contributor
0 Likes
705

By heart I think you'll have to repeat every check, so:

W=112

F=X

OR

W=123

F=X

OR

W=112

F=X

Read only

0 Likes
704

Hi,

Thanks for your replies.

I had solved it myself. In the condition element there is a tab called as conditions.

Placing a condition in  the conditions tab of the condition element solved my problem .

Thnks,

Bala

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
704

Still marked "not answered". Kindly close the discussion - see this blog.