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 January 3rd, 2017, 01:31 PM
rkury14 rkury14 is offline
Junior Community Member
 
Join Date: May 2014
Location: Tempe, AZ
Posts: 49
Default remove comma

I have a javascript to remove a comma on a name that is blank, but I my problem is the comma keeps going in front of the name instead of after it.

Here is the script.

return (Field("First Name") != "") ? "," + Field("First Name") : "";

the name looks like this ",Mike".

How can this be fixed please?

Thanks,
Reply With Quote
  #2  
Old January 3rd, 2017, 02:01 PM
jwhittaker jwhittaker is offline
Senior Contributor
 
Join Date: Feb 2009
Location: San Diego
Posts: 165
Default Re: remove comma

Try this:

if (Field("First Name") != "")
return Field("First Name") + ",";
else
return "";
__________________
FusionPro VDP Creator 10.0.26 | MacOS 10.13.4 | Acrobat DC
Reply With Quote
  #3  
Old January 3rd, 2017, 02:12 PM
rkury14 rkury14 is offline
Junior Community Member
 
Join Date: May 2014
Location: Tempe, AZ
Posts: 49
Default Re: remove comma

Thank you!
That works perfectly.

I have another question. Unfortunately, I can't figure out how to post a new post anywhere in my login, otherwise I would make a new post. I was just able to do it when I first logged in.

Anyways,

I have a client who wants me to generate a bar graph from a list. I looked it up online, but I am not sure how to apply it on my FusionPro. I don't have the actual list yet, but is there a default script for making graphs?

thank you for your help.
Reply With Quote
  #4  
Old January 3rd, 2017, 02:25 PM
jwhittaker jwhittaker is offline
Senior Contributor
 
Join Date: Feb 2009
Location: San Diego
Posts: 165
Default Re: remove comma

Sorry
I haven't done anything with graphs in FusionPro and I'm not even sure you can. You might have to wait for someone else.
__________________
FusionPro VDP Creator 10.0.26 | MacOS 10.13.4 | Acrobat DC
Reply With Quote
  #5  
Old January 3rd, 2017, 02:27 PM
rkury14 rkury14 is offline
Junior Community Member
 
Join Date: May 2014
Location: Tempe, AZ
Posts: 49
Default Re: remove comma

Okay thanks jwhittaker.
Reply With Quote
  #6  
Old January 4th, 2017, 12:39 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,549
Default Re: remove comma

Quote:
Originally Posted by rkury14 View Post
I have another question. Unfortunately, I can't figure out how to post a new post anywhere in my login, otherwise I would make a new post. I was just able to do it when I first logged in.
Go to a forum and click the "New Thread" button:

Quote:
Originally Posted by rkury14 View Post
I have a client who wants me to generate a bar graph from a list. I looked it up online, but I am not sure how to apply it on my FusionPro. I don't have the actual list yet, but is there a default script for making graphs?
There's a Charting sample in the installed Tutorials, and steps in the User Guide to set it up.
Attached Images
File Type: jpg ForumNewThreadButton.jpg (100.8 KB, 24 views)
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #7  
Old January 4th, 2017, 01:00 PM
rkury14 rkury14 is offline
Junior Community Member
 
Join Date: May 2014
Location: Tempe, AZ
Posts: 49
Default Re: remove comma

Thanks Dan,
it looks like I don't have some kind of permission or something because I could not find that "new thread" under any link. Except when I went to "MarcomCentral News", but then I needed permission to join that group which don't think I need to.
Reply With Quote
  #8  
Old January 4th, 2017, 01:08 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,549
Default Re: remove comma

Quote:
Originally Posted by rkury14 View Post
Thanks Dan,
it looks like I don't have some kind of permission or something because I could not find that "new thread" under any link.
No, you can't be in a thread already. You have to be on a forum page.

In other words, you can't create a new thread from inside a thread, which is where you are now as you're reading this. You have to be on a forum page, such as this one:
http://forums.pti.com/forumdisplay.php?f=5

At the very top of the page here in this thread, there's a link bar, which reads like so:
Code:
PTI Marketing Technologies User Community > Software-Related Talk > FusionPro® VDP Creator (formerly FusionPro® Desktop) > remove comma
You can either click the link "FusionPro® VDP Creator (formerly FusionPro® Desktop)" to get to the Creator sub-forum, and then add a new thread there, or click on "PTI Marketing Technologies User Community" or "Software-Related Talk" and then navigate to another sub-forum to post to.

If you are on this page:
http://forums.pti.com/forumdisplay.php?f=5
And you still don't see a New Thread button, send me a PM with a screenshot of the page.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
  #9  
Old January 4th, 2017, 02:09 PM
rkury14 rkury14 is offline
Junior Community Member
 
Join Date: May 2014
Location: Tempe, AZ
Posts: 49
Default Re: remove comma

Thanks Dan,
I see it in your link. You must think I'm a complete imbecile lol. Thanks for your help.
Reply With Quote
Reply

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 03:57 AM.


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