ActPresentation.com HOME FAQ FORUM info@ActPresentation.com
Phorum: speed & power.

ActPresentation.com


Add-ons for Sage ACT! CRM

ACT! addons by ActPresentation.com : Abacus Calculated Fields, PicturePlus, Quick Navigation List, Employment History, Quick Search, Presentation for ACT!

Phone Number Formatting

Posted by: Neil

Date: March 02, 2008 12:32AM

I was hoping that Abacus might help me with formatting Phone fields.
I have phone numbers stored in free form, but want to display different phone number fields in different ways,
for example, a mobile phone as xxxx xxx xxx and a phone or fax as xx xxxx xxxx.
How can I manipulate phone numbers?

Re: Phone Number Formatting

Posted by: Admin

Date: March 04, 2008 10:50PM

In what field do you store phone numbers in free form ( what is field type ) ?
Do you store special symbols as well ( brackets, minus sign, slash ) in this field ?

Re: Phone Number Formatting

Posted by: Neil

Date: March 04, 2008 10:53PM

Using the standard Phone fields (Phone, Mobile Phone, Alt Phone, Fax Phone etc) Type is Phone. Some special symbols although we try to not have them

Re: Phone Number Formatting

Posted by: Admin

Date: March 04, 2008 10:59PM

One of the solutions is as the following :

Abacus add-on can format ACT! fields using FORMAT function [www.actpresentation.com]

So the formula should look like this

Format( [Mobile Phone], "@@@@ @@@ @@@" )

Here "@@@@ @@@ @@@" is the format pattern.

The problem is : FORMAT expects Number as 1st parameter, so we need to convert [Mobile Phone] to number.

If we assume that there are no special symbols in Mobile Phone then we need just to delete spaces

replace( [Mobile Phone], ' ', '' )

So final formula will be :

Format( replace([Mobile Phone],' ',''), "@@@@ @@@ @@@" )


If you assign this formula to [User 1] field (for example) - you will see formatted phone in the User 1

PS. In one of next releases we plan to add FormatStr function that can receive string as 1st parameter

Re: Phone Number Formatting

Posted by: Neil

Date: March 07, 2008 12:21AM

Thank you, however, that format deletes leading zeros

Re: Phone Number Formatting

Posted by: Admin

Date: March 07, 2008 12:24AM

Yes, I have to confirm this is a problem.

One have to add leading zero check.

Example :

IF( SUBSTRING([Mobile Phone],1,1)='0' ) THEN
'0' + Format(replace([Mobile Phone],' ',''), "@@@ @@@ @@@")
ELSE
Format(replace([Mobile Phone],' ',''), "@@@@ @@@ @@@")
END


Please note : format strings are different in THEN and ELSE cases ( 3 or 4 leading @ )

ACT! software CRM addons - best plugins for ACT contact management software ( Act! by Sage software : ACT!2005, ACT!2006, ACT!2007, ACT!2008, Act by Sage Premium for Workgroups ).
Custom addon solutions ( ACT! add ons ) development and CRM (Customer Relationship Management) software training and consulting.