Below is a rule that Dan Korn helped me with. I'd like to add one part to
the rule. I'd like the ampersand character "&" to be converted to the word
"and" if user types "&". Can this be easily added to this rule?

Thank you,
Ed Johnson
Finlay

Here's the existing rule:


function ToCase(text, CaseSelection)
{
switch (ToLower(CaseSelection))
{
case "allcaps":
case "uppercase":
return ToUpper(text);
case "lowercase":
return ToLower(text);
case "propercase":
return ToTitleCase(text);
case "smallcaps":
return "<smallcap>" + text + "</smallcap>";
default:
return text;
}
}

var CaseSelection="propercase";
var text = "title";

var Exceptions = [ "LAN", "MIS", "NASD", "WAN", "PPGA", "HVAC", "LTD",
"and", "the", "of", "to" ];
var result = ToCase(Field(text), CaseSelection);
for (var i in Exceptions)
{
var re = RegExp("\\b" + Exceptions[i] + "\\b", "gi");
result = result.replace(re, Exceptions[i]);
}

return result;

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- 
Calling all FP Web Users!

Do you have a question or lots of knowledge to share about FusionPro Web?

If so, join our Printable Web to Print Users' Forum today!

Send email to [EMAIL PROTECTED] to find out how! 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED] 
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to