Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 22nd, 2010, 02:56 PM
jurgmay jurgmay is offline
Regular Contributor
 
Join Date: Aug 2009
Location: Bristol, UK
Posts: 53
Default & Problem

Hi all,

I'm having an issue using the £ sign in a text resource and can't figure out where I'm going wrong...

I have a text resource called 'Generic Promo Text 1' which contains the following text -

QUOTE REFERENCE NUMBER ^0 WHEN PLACING YOUR NEXT ORDER TO RECEIVE A £10 LOYALTY BONUS

The code I'm using is this -

Code:
theStr = TaggedTextFromRaw(Resource("Generic Promo Text 1").content);
theStr = ReplaceSubstring(theStr, "^0", Field("doc number"));
return theStr;
The text that is returned is -

QUOTE REFERENCE NUMBER 16113 WHEN PLACING YOUR NEXT ORDER TO RECEIVE A £10 LOYALTY BONUS

I can add the line -

Code:
theStr = ReplaceSubstring(theStr, "£", "£");
before returning 'theStr' but this just doesn't feel right. I'm sure I must be missing something obvious.

I've tried returning the text as tagged text and plain text but neither seem to work.

Thanks for any input!

Regards,

Juerg
__________________
FusionPro Desktop 6.2P1a Windows XP & Mac OS X 10.6 (Snow Leopard)
Reply With Quote
  #2  
Old July 23rd, 2010, 07:49 AM
esmith's Avatar
esmith esmith is offline
Senior Contributor
 
Join Date: Oct 2008
Location: Charlotte, NC
Posts: 869
Default Re: & Problem

Are you using a web front end? If so, what format does it provide the data to your FP template? I had a similar problem due to setting up templates with manual data using an "&" but when the portal supplied data, it was providing "&" forcing me to revise how I had my rule set up. I wound up NOT using the "TaggedTextFromRaw()" function when pulling in my data but checking the "treat as tagged" box in my rule.
__________________
Eric Smith
Content Developer
Classic
FP 9.3.6, MAC OSX 10.9.4, Acrobat 11.0.09
Reply With Quote
  #3  
Old July 23rd, 2010, 08:00 AM
jurgmay jurgmay is offline
Regular Contributor
 
Join Date: Aug 2009
Location: Bristol, UK
Posts: 53
Default Re: & Problem

Hi Eric,

No front end at all. I have a .txt file that contains the text string.

I could hard code this but as it's going to be used for our own invoices I want to make it easy for anyone to change the message. Doing it in a text resource means I can just tell someone where the file is and if they need to change the message they just opens the file, change the text and save it. No need to even open FP!

I'll try your suggestion now and see what happens!

Cheers,

Juerg
__________________
FusionPro Desktop 6.2P1a Windows XP & Mac OS X 10.6 (Snow Leopard)
Reply With Quote
  #4  
Old July 23rd, 2010, 08:02 AM
jurgmay jurgmay is offline
Regular Contributor
 
Join Date: Aug 2009
Location: Bristol, UK
Posts: 53
Default Re: & Problem

Perfect! That must have been the only combination I haven't tried

Thanks Eric!

Juerg
__________________
FusionPro Desktop 6.2P1a Windows XP & Mac OS X 10.6 (Snow Leopard)
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 10:45 AM.


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