Skip to Content
author's profile photo Former Member
Former Member

Applying Condition on smart forms

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 05:25 AM

    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&

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 05:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 06:03 AM

    hi robin,

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

    [ADDRESS-ISSUE;

    Rgds.,

    subash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 06:22 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 05:21 AM

    Hi,

    Try this

    If name3 and Name4 = ''. "represent null

    Start off with your write statement like

    Cheers!!

    VEnk@

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 05:21 AM

    Hello,,

    we can write if condition statement in the program lines.

    i think this may help u,

    try this ,

    check this

    thank u ,

    santhosh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 29, 2008 at 05:24 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 14, 2012 at 11:29 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.