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
					
				Adding & Removing Spaces In An Address Field
			5 posts
			 • Page 1 of 1
		
	
| 
                            Posts: 3 Joined: Sun Jan 29, 2006 11:29 am | |
| 
  
                            Posts: 2764 Joined: Thu Nov 20, 2003 11:01 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 | 
| 
 | 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 | 
| 
  
                            Posts: 2764 Joined: Thu Nov 20, 2003 11:01 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 | 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 | 
			5 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 8 guests

 
	     
  
  
  
  
  
  Ralph's Profile
 Ralph's Profile Ralph's Website
 Ralph's Website
 
  
  
 