Jump to content

One Rule, two different fonts

Brad Sawatzky

Recommended Posts

I've been trying to customize a phone format rule to return a different font after the area code, and I'm close, but I'm missing something.

I've copied a rule from a previous post and customized it, but when I validate I get:

"(mulitple font phone1 rule, line 11: ReferenceError: formatNumber is not defined)"


My existing rule looks like:


var thisNumber = Field("Phone1");

var afterAreaCodeTags = "<f name= \"CB Univers 67 CondensedBold\">";


var formatStyle01 = afterAreaCodeTags + "$1-$2"; //simple 7 digit phone

var formatStyle02 = "$1-" + afterAreaCodeTags + "$2-$3"; //simple 10 digit phone

var formatStyle03 = "+$1 $2-" + afterAreaCodeTags + "$3-$4"; //10 digit phone starts with 1

var formatStyle04 = "$1-" + afterAreaCodeTags + "$2-$3 ext.$4"; //10 digit phone with extension

var formatStyle05 = "+$1 $2-" + afterAreaCodeTags + "$3-$4 ext.$5"; //10 digit phone starts with 1 with extension

var formatStyle06 = afterAreaCodeTags + "$1-$2 ext.$3"; //7 digit phone with extension


return formatNumber(Trim(thisNumber));


If anyone can point me in the right direction, I'd sure appreciate the help.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...