01-26-2015 10:57 AM
Hi, I have a question on Smartform output. I am trying to print addresses in a certain format as required by the business. The format is as follows.
Name1,
Name2,
Str_suppl1, Str_suppl2,
Street,
City1, Region, Post_code1, Country
However, if there is a blank field, I do not want a blank/empty line in the address when output. At the moment, I am populating a structure with the necessary address fields, then I am using the following code in a text element.
&gs_adrc_lines-line1&
&gs_adrc_lines-line2&
&gs_adrc_lines-line3&
&gs_adrc_lines-line4&
&gs_adrc_lines-line5&
&gs_adrc_lines-line6&
Basically, I want to avoid the following issue when outputting an address if a field (name2 for example) is missing:
Example Company,
Big Warehouse, Euro Business Park,
Carver street,
Chicago, IL, 098 765, USA
01-26-2015 11:22 AM
Hi Sean,
You should divide this text element to 6 small text element, each one hold a value, then add 'Condition' like @Tharaka said.
regards,
Archer
01-26-2015 11:16 AM
Hi Sean,
You can maintain a condition for displaying .
Insert your logic there like;
if <name2_val> <> ''
Thanks
Tharaka
01-26-2015 11:22 AM
Hi Sean,
You should divide this text element to 6 small text element, each one hold a value, then add 'Condition' like @Tharaka said.
regards,
Archer
01-26-2015 11:40 AM
Thank you. I was looking for a way to do it within one text element but it seems to be impossible. Your way is the best alternative.