Jo,
Are you using this rule for each of your numbers and then a fourth rule
which puts it all together? It seems like you left out some information.
Here is what I might try in a single rule. I designed this rule to insert
the content (plus two spaces) to a new variable. If there is nothing, then
the new variable is simply empty. The final line will combine each variable
to create a final output string. The variables that have no content will be
empty (minus the two spaces), so you will only ever have two spaces between
a phone number and your email. Hope this helps :)
Here is the rule:
if (Field("DirectID") != "" && Field("Direct") != "") {
TestPhone1 = "<smallcap>" + Field("DirectID") + "</smallcap>" +
Rule("DirectFormatRule") + " " ;
}
else TestPhone1 = "";
if (Field("CellID") != "" && Field("Cell") != "") {
TestPhone2 = "<smallcap>" + Field("CellID") + "</smallcap>" +
Rule("CellFormatRule") + " " ;
}
else TestPhone2 = "";
if (Field("Email") != "") {
TestEmail = Rule("rule_Email"); // My email rule appends the
domain.com so clients don't have to.
}
else TestPhone2 = "";
return TestPhone1 + TestPhone2 + TestEmail ;
-----Original Message-----
From: Jo Gerth [mailto:[EMAIL PROTECTED]
Sent: Friday, April 13, 2007 12:01 PM
To: FusionPro Users Forum
Subject: [fusionpro] Need a java script rule
Hello
I need a rule that hopefully will accomplish a couple of things.
This is the rule that I am currently using.
if(Field("Cell")=="")
{
return "";
}
else
{
return '<smallcap>'+Field("CellID")+'</smallcap>' + ' ' + Rule
("CellFormatRule");
}
I have a line that reads
DIRECT 312 751 1234(two spaces)CELL 312 451 1234(twospaces)
[EMAIL PROTECTED] This rule works great for when I do not have a cell
number. But what it does not do is eliminate the two spaces after the cell
number. I end up with a total of four spaces between the direct no.
and email address. I only need two. Can a rule be written for that?
Thanks
Jo
--
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
--
--
Please note: It is the policy of West Press that all e-mail
sent to and from any @westpress.com address may be recorded
and monitored. Unless it is West Press related business,
please do not send any material of a private, personal,
or confidential nature to this or any @westpress.com
e-mail address.
This message has been scanned for UCE (spam), viruses,
and dangerous content, and is believed to be clean
--
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
--