Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 18 of 18 total
Thread Field formatting for display
Tue, Jan 8 2008 8:16 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bill

>When inserting spaces in a regular UK landline phone number, to my mind
>the first space goes after the STD code and before the local number.
>The idea being that if you are dialling the number from within the same
>STD area, you can leave off the STD code and dial just the local number.

Not quite right. You can just dial the local number but of you include the STD code BT (at least) will effectively strip it off and only charge you for the local call. Unless they've changed.

>London has now been re-joined into one area, so the STD code is 020. If
>you want to dial a London number from within London, you have to leave off
>only the 020 and start with the 3, 7 or 8. (You are one digit short on
>your London example by the way. London numbers are 8 digits long after
>the 020.) So, my preferred format for London numbers is 020 1234 5678.

Yes .... and no. 0207 is inner London and 0208 is outer London. As for the example what do you expect for test data Smiley

>The same applies to some other numbers starting with 02...
>
>Southampton and Portsmouth are one combined area and have 8-digit local
>numbers with the STD code 023. Rita's file has Southampton listed as
>02380 and Portsmouth listed as 02392, but to dial a Portsmouth number from
>within Portsmouth or Southampton, you dial the 8 digits starting with 92.
>(I think this is correct. Maybe a local can confirm?)

If you really want to get into it there are a whole slew of numbers like that. Where I used to live came under the Wellingborough exchange (01933) but all Raunds numbers started 62 so the full identifier for us was 0193362. I'm not sure (ie I never tried) if you could just dial the digits after the 62 and get anywhere. I suspect not.

Anyway the whole idea is to allow the users to specify the format they'd like for each STD as they define it (if they want to stick brackets or dashes in let them). The autodial feature uses the STD code as well. I could implement stripping your local code but unless you live in a major conurbation in this line of work most calls are going to be outside your local area. For sorting/searching its best not to have spaces, but for user interaction the version with spaces is much better.

Roy Lambert
Tue, Jan 8 2008 8:34 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bill
1. are you in the video (if so which one were you)?

2. do you do it and does it make enough to abandon any other work?

Roy Lambert
Wed, Jan 30 2008 4:34 PMPermanent Link

SI
<bsparrow@cix.co.uk (Bill Sparrow)> wrote:

Roy,

> eg of formatted phone numbers
>
> 01933 626285
> 0207 123 456
> 023
> 07 966 202885

Watch out for London etc.  

When inserting spaces in a regular UK landline phone number, to my mind
the first space goes after the STD code and before the local number.
The idea being that if you are dialling the number from within the same
STD area, you can leave off the STD code and dial just the local number.

London has now been re-joined into one area, so the STD code is 020.  If
you want to dial a London number from within London, you have to leave off
only the 020 and start with the 3, 7 or 8.  (You are one digit short on
your London example by the way.  London numbers are 8 digits long after
the 020.)  So, my preferred format for London numbers is 020 1234 5678.

The same applies to some other numbers starting with 02...

Southampton and Portsmouth are one combined area and have 8-digit local
numbers with the STD code 023.  Rita's file has Southampton listed as
02380 and Portsmouth listed as 02392, but to dial a Portsmouth number from
within Portsmouth or Southampton, you dial the 8 digits starting with 92.
(I think this is correct.  Maybe a local can confirm?)

Similarly, (I believe) Northern Ireland is one combined area with the STD
code 028, Coventry is 024 and Cardiff is 029.

--Bill Sparrow--
Definition of insanity - doing the same thing day in day out, month in
month out and expecting a different result - if you want to make a
positive change go to www.sparetimebigbiz.com and watch our 15 minute
"What's it all about" video clip - seriously you can make a difference!  
The company came top of the list in a Which report in October 2007!

Fri, Feb 1 2008 2:04 AMPermanent Link

David
Why not have a "format" lookup table?


On 12/29/07 6:59 AM, in article
5B5844C6-4430-4EA3-8390-2BDF52CF3AE7@news.elevatesoft.com, "Roy Lambert"
<roy.lambert@skynet.co.uk> wrote:

> Currently I format phone numbers prior to storing them in the table with the
> format depending on the STD code.
>
> eg of formatted phone numbers
>
> 01933 626285
> 0207 123 456
> 023
> 07 966 202885
>
> I'd prefer to store in the database with no spaces and format on display. Any
> suggestions which would work for TDBText, TDBEdit and TDBGrid?
>
> Roy Lambert

Fri, Feb 1 2008 3:11 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

David


If you can tell me how to hook that up into the display of the field through any of the components it might be shown in (label, edit, grid) I'd love to.

Roy Lambert
Wed, Feb 6 2008 4:54 PMPermanent Link

David
Have a lookup table for each variation and add a "phone_format" column in
the contact's table.
Apply a default value for each new contact and add a combo so the mask can
be selected for each contact.
On data change, read the value and apply the mask.


On 2/1/08 3:04 AM, in article
95379535-B891-45B1-B97D-BE9F1D67CA7C@news.elevatesoft.com, "Roy Lambert"
<roy.lambert@skynet.co.uk> wrote:

> David
>
>
> If you can tell me how to hook that up into the display of the field through
> any of the components it might be shown in (label, edit, grid) I'd love to.
>
> Roy Lambert
>

Fri, Jun 13 2008 4:58 PMPermanent Link

Hi Roy,

I've not been on the group since January, so apologies for the very late
reply!

Yes, I agree that you can dial the whole number, including STD, for numbers
in your local area.  It's just that, with the STD code for local numbers
being optional, it is helpful if the space is inserted at the point where the
optional part ends.  That distinction is a bit moot with the increase in us
of mobiles and having to remember to dial the STD code for "local" numbers!

> Yes .... and no. 0207 is inner London and 0208 is outer London.

That distinction is now historical.  Now that the STD code for London is 020,
BT are free to allocate new numbers wherever they like.  If it starts with a
7, its probably inner London, but you can't say for sure.

> Anyway the whole idea is to allow the users to specify the format they'd
> like for each STD as they define it (if they want to stick brackets or
> dashes in let them).

> For sorting/searching its best not to have spaces, but for user
> interaction the version with spaces is much better.

I agree with the aims and have seriously thought of that for my apps, just
curious how you would implement it.  If you are ONLY storing the digits in
the database, how do the users get to define and retain their preferred
layout for each STD code?  What I was thinking of doing was either:-

a) Store in two fields - the one the user typed and one with only digits.

b) Store only the digits and use an algorithm (perhaps with user-defined
parameters) in TField.OnGetText to format it for display and print purposes.

For the latter, there would be only "one true way" to format a number based
on the STD code length and parameters like "add some brackets"

--Bill Sparrow--
Definition of insanity - doing the same thing day in day out, month in month
out and expecting a different result - if you want to make a positive change
go to www.positivewealth.co.uk and watch our 15 minute "What's it all about"
video clip - seriously you can make a difference!  The company has been short
listed for a Which? Award for 2008.

> Bill
> 1. are you in the video (if so which one were you)?
>
> 2. do you do it and does it make enough to abandon any other work?

No I'm not in the video, but I know most of the people who are.
Also I am the proud owner of one of the yellow minis featured in the video.  
There are now about 100 of them around the country.

It's a gradual build-up of income.  The plan is to overtake my current "main"
income, then I can retire!



In article <C47DF758-6BD0-4ECA-A021-15C4E1DB07FB@news.elevatesoft.com>,
roy.lambert@skynet.co.uk (Roy Lambert) wrote:

> *Subject:* Re: Field formatting for display
> *From:* Roy Lambert <roy.lambert@skynet.co.uk>
> *Date:* Tue, 8 Jan 2008 13:10:29 +0000
>
> Bill
>
> >When inserting spaces in a regular UK landline phone number, to my mind
> >the first space goes after the STD code and before the local number.
> >The idea being that if you are dialling the number from within the same
> >STD area, you can leave off the STD code and dial just the local number.
>
> Not quite right. You can just dial the local number but of you include the
> STD code BT (at least) will effectively strip it off and only charge you
> for the local call. Unless they've changed.
>
> >London has now been re-joined into one area, so the STD code is 020. If
> >you want to dial a London number from within London, you have to leave off
> >only the 020 and start with the 3, 7 or 8. (You are one digit short on
> >your London example by the way. London numbers are 8 digits long after
> >the 020.) So, my preferred format for London numbers is 020 1234 5678.
>
> Yes .... and no. 0207 is inner London and 0208 is outer London. As for the
> example what do you expect for test data Smiley
>
> >The same applies to some other numbers starting with 02...
> >
> >Southampton and Portsmouth are one combined area and have 8-digit local
> >numbers with the STD code 023. Rita's file has Southampton listed as
> >02380 and Portsmouth listed as 02392, but to dial a Portsmouth number from
> >within Portsmouth or Southampton, you dial the 8 digits starting with 92.
> >(I think this is correct. Maybe a local can confirm?)
>
> If you really want to get into it there are a whole slew of numbers like
> that. Where I used to live came under the Wellingborough exchange (01933)
> but all Raunds numbers started 62 so the full identifier for us was
> 0193362. I'm not sure (ie I never tried) if you could just dial the digits
> after the 62 and get anywhere. I suspect not.
>
> Anyway the whole idea is to allow the users to specify the format they'd
> like for each STD as they define it (if they want to stick brackets or
> dashes in let them). The autodial feature uses the STD code as well. I
> could implement stripping your local code but unless you live in a major
> conurbation in this line of work most calls are going to be outside your
> local area. For sorting/searching its best not to have spaces, but for user
> interaction the version with spaces is much better.
>
> Roy Lambert
>
>
Sat, Jun 14 2008 5:06 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Bill

>I agree with the aims and have seriously thought of that for my apps, just
>curious how you would implement it. If you are ONLY storing the digits in
>the database, how do the users get to define and retain their preferred
>layout for each STD code? What I was thinking of doing was either:-
>
>a) Store in two fields - the one the user typed and one with only digits.
>
>b) Store only the digits and use an algorithm (perhaps with user-defined
>parameters) in TField.OnGetText to format it for display and print purposes.
>
>For the latter, there would be only "one true way" to format a number based
>on the STD code length and parameters like "add some brackets"

I'm doing it the other way round. I'm storing the formatted string and stripping the spaces out for queries / filters. Since I'm using a (homebrew) query generator I've arranged for any reference to a phone / fax number in the WHERE clause (or filter) to be replaced by REPLACE(' ','',$F) $T REPLACE(' ','',$V) $F is the field name, $T is the test and $V is the variable/criteria to test against.

This approach does have some implications for indexing (eg 01993 621554 would be in a different position from 01 933 621554) but I should minimise that by having a before insert / before post trigger to do the formatting according to a simpler set of criteria.

I had the trigger all sorted out, but it seems to have gone walkabout so I'll have to reinvent it Frown

It may still be there but trying to use the search facility in Vista without indexing everything seems to be a task best left to Marvin (the paranoid android)

>No I'm not in the video, but I know most of the people who are.
>Also I am the proud owner of one of the yellow minis featured in the video.
>There are now about 100 of them around the country.
>
>It's a gradual build-up of income. The plan is to overtake my current "main"
>income, then I can retire!

Sounds like a good plan

Roy Lambert
Previous PagePage 2 of 2
Jump to Page:  1 2
Image