How to deal with a phone number field ?

View: New views
8 Messages — Rating Filter:   Alert me  

How to deal with a phone number field ?

by Kurt Kraut-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,


I'm trying to build a personal contact database, with fields like Name, Address, E-mail, Phone Number, Cell phone etc. I'd like to allow only numbers to be typed in the 'Phone number' (to avoid typos and future incompatabilities)  field. Unfortunately, when I input phone numbers like '12345678' it is converted to '1.23457e+07'.

How can I avoid this behaviour ?


Thanks in advance,


Kurt Kraut

_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by "Arq. Maximiliano" Meilán :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Confirmed with Glom 1.8.5, Ubuntu 8.10
When reach the seven digit, Glom leaves the decimal format.
Aritmetical operations works fine, even using diferent formats.


El mar, 20-01-2009 a las 18:25 -0200, Kurt Kraut escribió:

> Hi,
>
>
> I'm trying to build a personal contact database, with fields like
> Name, Address, E-mail, Phone Number, Cell phone etc. I'd like to allow
> only numbers to be typed in the 'Phone number' (to avoid typos and
> future incompatabilities)  field. Unfortunately, when I input phone
> numbers like '12345678' it is converted to '1.23457e+07'.
>
> How can I avoid this behaviour ?
>
>
> Thanks in advance,
>
>
> Kurt Kraut
> _______________________________________________
> glom-devel-list mailing list
> glom-devel-list@...
> http://mail.gnome.org/mailman/listinfo/glom-devel-list


_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by Murray Cumming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-01-21 at 12:59 -0200, Arq. Maximiliano Meilán wrote:

> Confirmed with Glom 1.8.5, Ubuntu 8.10
> When reach the seven digit, Glom leaves the decimal format.
> Aritmetical operations works fine, even using diferent formats.
>
>
> El mar, 20-01-2009 a las 18:25 -0200, Kurt Kraut escribió:
> > Hi,
> >
> >
> > I'm trying to build a personal contact database, with fields like
> > Name, Address, E-mail, Phone Number, Cell phone etc. I'd like to allow
> > only numbers to be typed in the 'Phone number'

That's unwise. + is a meaningful part of many phone numbers. And people
really like using spaces and brackets.

>  (to avoid typos and
> > future incompatabilities)  field. Unfortunately, when I input phone
> > numbers like '12345678' it is converted to '1.23457e+07'.

That's not nice regardless of whether it's for a phone number, so I'll
investigate. Please open a bug if I forget.

--
Murray Cumming
murrayc@...
www.murrayc.com
www.openismus.com


_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by Mathias Hasselmann-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Mittwoch, den 21.01.2009, 17:53 +0100 schrieb Murray Cumming:

> On Wed, 2009-01-21 at 12:59 -0200, Arq. Maximiliano Meilán wrote:
> > Confirmed with Glom 1.8.5, Ubuntu 8.10
> > When reach the seven digit, Glom leaves the decimal format.
> > Aritmetical operations works fine, even using diferent formats.
> >
> >
> > El mar, 20-01-2009 a las 18:25 -0200, Kurt Kraut escribió:
> > > Hi,
> > >
> > >
> > > I'm trying to build a personal contact database, with fields like
> > > Name, Address, E-mail, Phone Number, Cell phone etc. I'd like to allow
> > > only numbers to be typed in the 'Phone number'
>
> That's unwise. + is a meaningful part of many phone numbers. And people
> really like using spaces and brackets.

Other valid characters in phone numbers are: #*pw
In France it is common to use dots as delimiters in phone numbers.
In Germany it is common parentheses around area codes.

> >  (to avoid typos and
> > > future incompatabilities)  field. Unfortunately, when I input phone
> > > numbers like '12345678' it is converted to '1.23457e+07'.
>
> That's not nice regardless of whether it's for a phone number, so I'll
> investigate. Please open a bug if I forget.

Considering all the noise people add to phone numbers it might make
sense to introduce phone-number support to Glom. This support could
consist of just a special text entry that normalizes input before
putting it into the database. Or you'd have a special data type, which
stores the user input version for display and a normalized for matching.

Ciao,
Mathias
--
Mathias Hasselmann <mathias@...>
http://www.openismus.com/

_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by Murray Cumming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-01-21 at 18:01 +0100, Mathias Hasselmann wrote:
> Considering all the noise people add to phone numbers it might make
> sense to introduce phone-number support to Glom. This support could
> consist of just a special text entry that normalizes input before
> putting it into the database. Or you'd have a special data type, which
> stores the user input version for display and a normalized for matching.

Yes, that would be a nice feature.

--
Murray Cumming
murrayc@...
www.murrayc.com
www.openismus.com


_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by Armin Burgmeier :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-01-21 at 17:53 +0100, Murray Cumming wrote:

> On Wed, 2009-01-21 at 12:59 -0200, Arq. Maximiliano Meilán wrote:
> > Confirmed with Glom 1.8.5, Ubuntu 8.10
> > When reach the seven digit, Glom leaves the decimal format.
> > Aritmetical operations works fine, even using diferent formats.
> >
> >
> > El mar, 20-01-2009 a las 18:25 -0200, Kurt Kraut escribió:
> > > Hi,
> > >
> > >
> > > I'm trying to build a personal contact database, with fields like
> > > Name, Address, E-mail, Phone Number, Cell phone etc. I'd like to allow
> > > only numbers to be typed in the 'Phone number'
>
> That's unwise. + is a meaningful part of many phone numbers. And people
> really like using spaces and brackets.
>
> >  (to avoid typos and
> > > future incompatabilities)  field. Unfortunately, when I input phone
> > > numbers like '12345678' it is converted to '1.23457e+07'.
>
> That's not nice regardless of whether it's for a phone number, so I'll
> investigate. Please open a bug if I forget.

Are you using sqlite? With sqlite, numbers are currently stored as
"real" type (equivelant double in C++) in the database, which may lead
to a notation such as '1.23457e+07'.

Maybe we'll have to do something else to implement Glom's numeric type
with sqlite (sqlite has only types for "integer" and "real", and Glom
currently uses real because it can't guess whether a numeric type is
meant as being integral one or not).

Armin

_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by Kurt Kraut-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello guys,


Yes, I'm using sqlite and Glom under Windows Vista. So, should I bug report this issue ?

Thanks for your attention,


Kurt Kraut

On Wed, Jan 21, 2009 at 6:48 PM, Armin Burgmeier <armin@...> wrote:
On Wed, 2009-01-21 at 17:53 +0100, Murray Cumming wrote:
> On Wed, 2009-01-21 at 12:59 -0200, Arq. Maximiliano Meilán wrote:
> > Confirmed with Glom 1.8.5, Ubuntu 8.10
> > When reach the seven digit, Glom leaves the decimal format.
> > Aritmetical operations works fine, even using diferent formats.
> >
> >
> > El mar, 20-01-2009 a las 18:25 -0200, Kurt Kraut escribió:
> > > Hi,
> > >
> > >
> > > I'm trying to build a personal contact database, with fields like
> > > Name, Address, E-mail, Phone Number, Cell phone etc. I'd like to allow
> > > only numbers to be typed in the 'Phone number'
>
> That's unwise. + is a meaningful part of many phone numbers. And people
> really like using spaces and brackets.
>
> >  (to avoid typos and
> > > future incompatabilities)  field. Unfortunately, when I input phone
> > > numbers like '12345678' it is converted to '1.23457e+07'.
>
> That's not nice regardless of whether it's for a phone number, so I'll
> investigate. Please open a bug if I forget.

Are you using sqlite? With sqlite, numbers are currently stored as
"real" type (equivelant double in C++) in the database, which may lead
to a notation such as '1.23457e+07'.

Maybe we'll have to do something else to implement Glom's numeric type
with sqlite (sqlite has only types for "integer" and "real", and Glom
currently uses real because it can't guess whether a numeric type is
meant as being integral one or not).

Armin

_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list


_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list

Re: How to deal with a phone number field ?

by Murray Cumming :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-01-21 at 17:53 +0100, Murray Cumming wrote:
> >  (to avoid typos and
> > > future incompatabilities)  field. Unfortunately, when I input phone
> > > numbers like '12345678' it is converted to '1.23457e+07'.
>
> That's not nice regardless of whether it's for a phone number, so I'll
> investigate. Please open a bug if I forget.

Please do that in future. I almost forgot.

This is fixed in svn, so it will be fixed in the next 1.8.x and 1.9.x
versions, at least for 15 digits or less. In the meantime for older
versions of Glom, you may avoid the problem by setting that field to
display 0 decimal points in the field formatting.

Of course, phone numbers should still really be text fields anyway.

--
Murray Cumming
murrayc@...
www.murrayc.com
www.openismus.com


_______________________________________________
glom-devel-list mailing list
glom-devel-list@...
http://mail.gnome.org/mailman/listinfo/glom-devel-list