Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

City, State Zip-code line...

Avatar

Former Community Member

Hi...

New here... Version 8.2.3 running in SAP.

Want to format a single address line from 4 individual fields... City,  State Zip-code

Want the City, seperated from the State by a comma and 1 space.... and State seperated from the Zip-code by 1 space.

Examples...

Boston, MA 07884

Fountain Valley, CA 76877

How to do this in the form Layout?

In the Object Layout tab... I set the fields to "Expand to fit" in the width direction... but the City overlays the State...

I do not want... Boston,                                     MA 07884 to accomodate longer City names.

For now... I format the single address line in the Interface ABAP code.

Thanks,

Dave T...

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Dave,

One quick way would be to have script in the calculate event of the object that displays all of the data. This could look at the other fields and if they are not null, include their values in the main field.

I have an example here: http://assure.ly/iuYifq

Hope that helps,

Niall

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

Hi Dave,

One quick way would be to have script in the calculate event of the object that displays all of the data. This could look at the other fields and if they are not null, include their values in the main field.

I have an example here: http://assure.ly/iuYifq

Hope that helps,

Niall

Avatar

Former Community Member

Hi Niall,

Thanks... I understand the FormCalc concatenate command...  this is in a paper form (not interactive)...

1) Created a Text Field object... Binding= none...

2) Selected the Text Field... then from Script Editor palette... Show=calculate... Run At=Client...

concat ($record.SHIP_TO.CITY

,", ",$record.SHIP_TO.STATE," ",$record.SHIP_TO.POSTAL)

Seems to work... is this correct?

What's an easy way to find out the field names? i.e.   $record.SHIP_TO.CITY

Thanks again,

DaveT...

Avatar

Level 10

Hi DaveT,

For starters you do not need to set the binding to None (Object > Binding palette). I had this in the example, because originally I didn't want the field to take part in the import XML.

When dealing with data, more often than not you really do want the objects set with a binding.

Using $record are you accessing the imported XML or a data connection? If so I would set up the data connection first and then bind the appropriate fields to that data connection.

The XFA Specification may help: http://partners.adobe.com/public/developer/xml/index_arch.html.

Hope that helps,

Niall

Avatar

Former Community Member

Hi Niall,

I am just self-learning Adobe Forms in an SAP environment... so I'm not very familiar with most aspects.

The form is for printing shipping carton labels... the data comes from the Interface (ABAP program code gets the data).

I appreciate your help !

DaveT

Avatar

Level 10

Hi DaveT,

I am probably not the best person to help out here.

If you are in a SAP/LiveCycle environment then you should be able to push the XML data (from the interface) into the form. Not having that environment or workflow makes it difficult to give clear instructions.

At a minimum you will need a data connection and the address fields bound to that data connection.

Hopefully someone else will be able to help out here.

Good luck,

Niall