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

Applying Condition on smart forms

Former Member
0 Likes
2,802

i have a requirement in my smart form like,

&name1& &name2&

&name3& &name4&

&addrs& &city&

as shown above if fields name3 and name4 are null , empty line should not be passed instead addrs and city field should be my 2nd line.... how and where do i apply conditions in my smart form...

Thanks and Regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,057

create to 2 text

if name3 or name4 ne ' '. (in condition tab)

1 ..&name1& &name2&

&name3& &name4&

&addrs& &city&

if name3 or name4 = ' '. (in condition tab)

2....&name1& &name2&

&addrs& &city&

8 REPLIES 8
Read only

Former Member
0 Likes
2,057

Hi,

Try this

If name3 and Name4 = ''. "represent null

Start off with your write statement like

Cheers!!

VEnk@

Read only

Former Member
0 Likes
2,057

Hello,,

we can write if condition statement in the program lines.

i think this may help u,

try this ,

check this

thank u ,

santhosh

Read only

Former Member
0 Likes
2,057

Hi,

In scripts there is command

like Address ... End Address.

u have to place all ur fields in between Address ... End Address.

I think u can also use the same in smartforms also...

Rgds.,

subash

Read only

Former Member
0 Likes
2,058

create to 2 text

if name3 or name4 ne ' '. (in condition tab)

1 ..&name1& &name2&

&name3& &name4&

&addrs& &city&

if name3 or name4 = ' '. (in condition tab)

2....&name1& &name2&

&addrs& &city&

Read only

Former Member
0 Likes
2,057

Hi Robin,

Declare three fields as strings.


DATA : str1 TYPE string,
       str2 TYPE string,
       str3 TYPE string.


CONCATENATE name1 name2 INTO str1.

CONCATENATE name3 nmae4 INTO str2.

CONCATENATE addrs city INTO str3.

Then write the 3 strings in the smartforms in TEXT nodes, and check the conditions whether there are initial or not.

Then in text---> conditions check for intial.

Regards

Kumar M.

Edited by: mukesh kumar on Oct 29, 2008 6:41 AM

Read only

Former Member
0 Likes
2,057

hi robin,

have a look at it... i think this will solve ur problem.

[;

Rgds.,

subash

Read only

Former Member
0 Likes
2,057

Hi

there is no need to apply any type of conditions....only in one text drag & drop

&name1& &name2&

&name3& &name4&

&addrs& &city&

If name3 and name4 is blank then the next line will automatically shifted up....

Arunima

Read only

HarshalVakil
Active Contributor
0 Likes
2,057

I have the same requirement. where I am printing name1 name2 name 3 and name 4 in smart form with different node for each.

currently is displaying

NAME1

NAME2

NAME3

NAME4

i want to hide name1 and name2 if there is values in name3 and name4. if name3 and name4 does not have any values then only it should print name1 and name2.

(all NAME1 NAME2 NAME3 NAME4 has values)

I am putting following conditions in conditions tab of name1 and name2 node.

GS_SOADRC-NAME3 = ' '.

GS_SOADRC-NAME4 = ' '.

And when i execute the smart form istead of hiding name1 and name2 its showing following output

NAME2

NAME1

NAME2

NAME1

where i want output to be

NAME3

NAME4.

can you suggest how this can be done?

Thanks,

Harshal

Harshal Vakil