Adding & Removing Spaces In An Address Field

General support questions.
Posts: 3
Joined: Sun Jan 29, 2006 11:29 am
PostPosted: Sun Feb 26, 2006 4:08 pm
Can someone help me?

I have a field titled "Address Line" which combines the values of fields "Title", "Spouse", "First Name" and "Last Name."

PROBLEM: This calculation adds a space before "First Name" if there is NO Title.
Title & " " & If(IsEmpty(Spouse:); ""; "and Mrs. ") & First Name & " " & Last Name

PROBLEM: This calculation takes out the space before "First Name" but then does NOT have a space between "Title" and "First Name" if there IS a "Title."
Title & If(IsEmpty(Title); "" ) & If(IsEmpty(Spouse:); ""; "and Mrs. ") & Name First & " " & Name Last

Can someone help me get the spacing correct? I'm sure the solution is fairly simple but I’m too simple to get anything to work.

Thanks,
Ralph
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Mon Feb 27, 2006 7:04 am
Try just including the spacing in the true portion of the If test, like this:

Title &
if ( not ismepty( Spouse ) ; " and Mrs." ; "" ) &
if ( not ismepty( FirstName ) ; " " & FirstName ; "" ) &
if ( not ismepty( LastName ) ; " " & LastName ; "" )
John Sindelar
SeedCode
PostPosted: Mon Feb 27, 2006 2:09 pm
Thanks for the effort John, but your calculation does not remove the space before "FirstName" on the "Address Line" if there is no "Title."

Anything else I can try?

Thanks,
Ralph
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Tue Feb 28, 2006 4:58 am
Sorry, I just read that wrong. How's this:

Trim (
if ( not ismepty( Title ) ; Title & " " ; "" ) &
if ( not ismepty( Spouse ) ; "and Mrs. " ; "" ) &
if ( not ismepty( FirstName ) ; FirstName & " " ; "" ) &
if ( not ismepty( LastName ) ; LastName & " " ; "" )
)
John Sindelar
SeedCode
Posts: 3
Joined: Sun Jan 29, 2006 11:29 am
PostPosted: Tue Feb 28, 2006 12:17 pm
John,

You rock! Thanks - it works just great. I really appreciate your efforts. It's no wonder Cleveland Consulting is rapidly becoming known as the place to go to if you're having problems with FM.

Ralph

Return to General Support

Who is online

Users browsing this forum: No registered users and 2 guests

cron
(855) SEEDCODE
[email protected]
Follow us: