Jump to content

& Problem


jurgmay

Recommended Posts

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 -

 

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 -

 

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

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...