cancel
Showing results for 
Search instead for 
Did you mean: 

Removing blank line in smart forms

madhu_reddy22
Participant
0 Kudos

Hi All,

I have developed a smart form(a letter) which has about 5 address fields in the following order.

&address_line1&

&addressline2&

&city& , &state& &zip&

&addressline2& is not mandatory. When this parameter is empty then i get the output like this

1234 wood creek street

Herndon, VA 20171

I do not want the gap . What am i supposed to do. I want something like If addressline2 is null then delete line .

Thanksin advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

for all the 3 lines create 3 text elements...

for address2 give condiotion as

if address2 NE ''.

print address2

endif.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

If its a text node separatly for the Address line 2 then there would be condition tab at where you can check whether value is initial.

If its template then you create a alternative with conition address line2 is intial

if yes then write all variables excluding address line 2.

if no write all vairables including address line 2.

former_member196280
Active Contributor
0 Kudos

check the paragraph format in your smartstyle and see whether there is any options for not displaying blank lines... we have an option in sapscript.. No blank lines, currently I couldn't remember for SF.

or use conditions...to remove blank lines..

Regards,

SaiRam

Former Member
0 Kudos

hi,

U might be using template to display this address, to remove the gap dynamically is not possible. U can use alternative in such a way that...

If &addressline2& NE ' '.

&address_line1&

&addressline2&

&city& , &state& &zip&

ELSE.

&address_line1&

&city& , &state& &zip&

Reward points if helpful.

harimanjesh_an
Active Participant
0 Kudos

hi madhu,

try like this,

&address_line1&

<b>IF &addressline2& EQ SPACE.</b>

&city& , &state& &zip&

ELSE

&addressline2&

&city& , &state& &zip&

ENDIF

Reward me if useful.....

Harimanjesh AN

madhu_reddy22
Participant
0 Kudos

HI Hari,

Do i write the code in the text element itself. I thought the code should be written only in the program lines. And if we write in the program lines the &'s should not be mentioned. Correct me if i am wrong

Former Member
0 Kudos

Madhu,

Build an address internal table with all the three lines of address. If the address2 line is blank then donot populate that in internal table. Add a loop node with that internal table and put a text element with in the loop.

You need not Use & in the program lines.

Thanks,

Vamshi.