Author |
Message |
Minco
Groupie
Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
|
 Topic: Display in a phone number format Posted: 17 Oct 2013 at 6:44am |
Hi,
I've been surfing around trying to see how to get a field to display like a phone number. So instead of seeing 1234567890 on the report, you'd see (123)456-7890.
I'm pretty certain I have to do a formula to accomplish this, but one suggestion;
Tel: ( + {BPADDRESS.TEL_0}[1 to 3] + ) +
{BPADDRESS.TEL_0}[4 to 6] + - +
{BPADDRESS.TEL_0}[7 to 10]
Doesn't work. Any other suggestions? I'm working with 2008 version.
Thanks!
|
Be kind to those less fortunate.
|
IP Logged |
|
kostya1122
Senior Member
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
|
 Posted: 17 Oct 2013 at 7:13am |
try
Tel: ( + totext(mid({BPADDRESS.TEL_0},1,3)) + ) +
totext(mid({BPADDRESS.TEL_0},4,3)) + - +
totext(mid({BPADDRESS.TEL_0},8,4))
|
IP Logged |
|
Minco
Groupie
Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
|
 Posted: 17 Oct 2013 at 7:45am |
The error comes up that the remaining text does not appear to be part of the formula.
|
Be kind to those less fortunate.
|
IP Logged |
|
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
|
 Posted: 17 Oct 2013 at 8:46am |
another option
Picture (totext({BPADDRESS.TEL_0},0,''),"(xxx) xxx-xxxx" )
|
IP Logged |
|
kostya1122
Senior Member
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
|
 Posted: 17 Oct 2013 at 8:49am |
i think its the quotes format
try replacing them
"Tel: (" + totext(mid({BPADDRESS.TEL_0},1,3)) + ") " +
totext(mid({BPADDRESS.TEL_0},4,3)) + "-" +
totext(mid({BPADDRESS.TEL_0},8,4))
|
IP Logged |
|
Minco
Groupie
Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
|
 Posted: 17 Oct 2013 at 8:55am |
Bingo! That worked beautifully.
Thanks much!
|
Be kind to those less fortunate.
|
IP Logged |
|
Minco
Groupie
Joined: 28 Nov 2012
Location: United States
Online Status: Offline
Posts: 62
|
 Posted: 17 Oct 2013 at 8:56am |
Oh, except the last totext statement is actually 7,4 not 8,4
|
Be kind to those less fortunate.
|
IP Logged |
|
|