Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > FusionPro® VDP Creator

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 10th, 2009, 09:58 AM
mstanton mstanton is offline
Regular Contributor
 
Join Date: Aug 2009
Posts: 65
Thumbs up Discard Commas before Suffix

Hello,

I am building business cards for a hospital and I need a way to get rid of commas if the field "Suffix" is empty. For example, if Joe Smith doesn't want his suffix on the business card, it should read "Joe Smith"
But if he does want a suffix, let's say MD, it should read "Joe Smith, MD"

I have tried some of the code listed in this forum for similar situations, for example:

if(Field("Suffix") == "")
return Field("Prefix") + " " + Field("First") + " " + Field("MI") + " " + Field("Last")
else
return (Field("Prefix") + " " + Field("First") + " " + Field("MI") + " " + Field("Last") + "," + " " + Field("Suffix"));

but none of it is working. I am using Fusion Pro 6.0. Can anyone help me? Thanks!

Last edited by mstanton; August 19th, 2009 at 12:17 PM..
Reply With Quote
  #2  
Old August 10th, 2009, 10:17 AM
mstanton mstanton is offline
Regular Contributor
 
Join Date: Aug 2009
Posts: 65
Default Re: Discard Commas before Suffix

I kept working on it and answered my own question. I just created a rule:

if(Field("Suffix") == "")
return ""
else
return ", "

Then I went into the variable text field, deleted the comma and space I had between the last name and suffix, and inserted the newly created Comma Out rule in it's place. Works like a charm!
Reply With Quote
Reply

Tags
comma, suffix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.