Jump to content

merge fields: how do I get rid of extra space?


dlazenby
 Share

This topic is 6436 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Merging a name:

Field1: FirstName; Field 2: MiddleName1 Field3: MiddleName2 (some people have 2 middle names); Field4: LastName

In Layout, I use the insert merge field function to put the fields together and I leave a single space between the inner merged fields. However, if the person does not have a middle name(s) I am left with extra spaces that make it look askew.

Example: John Jacob Jinglehimer Smith would have the appropriate blank space behind Jacob and Jinglehimer. However, if his name is John Smith with no middle names it will come out John Smith with 3 blank spaces between John and Smith.

I guess I could put no spaces between the merge fields and try to figure out a way so that the individual fields automatically have a blank character space at the end. (Is that feasible?)

Should I do this with a calculation field (I don't know how). For example, Name= Field1 + Field2 + Field3 + Field4.

Please advise.

Doug Lazenby

BTW, in this post I tried to put John Smith with 3 blank spaces between John and Smith but the sofware automatically closed that gap to a single space.

Link to comment
Share on other sites

Most of the time we create a calc for the full name to display in merge format.

Something along the lines of

First Name &

If ( IsEmpty (Middle Name 1);""; " " & Middle Name 1 ) &

If ( IsEmpty (Middle Name 2);""; " " & Middle Name 2 ) &

If ( IsEmpty (Last Name);""; " " & Last Name )

Make sure your result is text

HTH

Link to comment
Share on other sites

This topic is 6436 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.