Room inbetween pairs of characters

Room inbetween pairs of characters

am 03.09.2007 14:03:59 von esha

Can Filemaker 9 Adv. generate room inbetween pairs of characters like
phonenumbers - and still have the field be normally searchable and
sortable? So the space is "cosmetic" or non-existent on the logical
level - is that possible?

Thx in advance!

:-) Esben

Mail: nameasofabove_h@get2net.dk

Re: Room inbetween pairs of characters

am 04.09.2007 00:26:03 von esha

Esben wrote:

> Can Filemaker 9 Adv. generate room inbetween pairs of characters like
> phonenumbers - and still have the field be normally searchable and
> sortable? So the space is "cosmetic" or non-existent on the logical
> level - is that possible?

Maybe I was unclear: what I want is to have users enter a phonenumber
like:

12345678

but for instance end with it automatically looking like this

12 34 56 78

BTW I realized there's no logical problem: FM9 already recognizes the
value with the spaces manually put there.

I can't believe FM9 shouldn't be able to do this...

:-) Esben

Mail: nameasofabove_h@get2net.dk

Re: Room inbetween pairs of characters

am 04.09.2007 00:47:54 von Tom Stiller

In article <1i3w3pf.kbvldkpabkzvN%esha@nospamget2net.dk>,
esha@nospamget2net.dk (Esben) wrote:

> Esben wrote:
>
> > Can Filemaker 9 Adv. generate room inbetween pairs of characters like
> > phonenumbers - and still have the field be normally searchable and
> > sortable? So the space is "cosmetic" or non-existent on the logical
> > level - is that possible?
>
> Maybe I was unclear: what I want is to have users enter a phonenumber
> like:
>
> 12345678
>
> but for instance end with it automatically looking like this
>
> 12 34 56 78
>
> BTW I realized there's no logical problem: FM9 already recognizes the
> value with the spaces manually put there.
>
> I can't believe FM9 shouldn't be able to do this...
>

I don't know if the same custom function is available in FM9 as was
available for FM7, but Database Pros (http://www.databasepros.com) had a
custom function (numberformat) that will format numeric fields in a
variety of user specified formats.

--
Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3 7BDA 71ED 6496 99C0 C7CF

Re: Room inbetween pairs of characters

am 04.09.2007 01:08:50 von esha

Tom Stiller wrote:

> In article <1i3w3pf.kbvldkpabkzvN%esha@nospamget2net.dk>,
> esha@nospamget2net.dk (Esben) wrote:
>
> > Esben wrote:
> >
> > > Can Filemaker 9 Adv. generate room inbetween pairs of characters like
> > > phonenumbers - and still have the field be normally searchable and
> > > sortable? So the space is "cosmetic" or non-existent on the logical
> > > level - is that possible?
> >
> > Maybe I was unclear: what I want is to have users enter a phonenumber
> > like:
> >
> > 12345678
> >
> > but for instance end with it automatically looking like this
> >
> > 12 34 56 78
> >
> > BTW I realized there's no logical problem: FM9 already recognizes the
> > value with the spaces manually put there.
> >
> > I can't believe FM9 shouldn't be able to do this...
> >
>
> I don't know if the same custom function is available in FM9 as was
> available for FM7, but Database Pros (http://www.databasepros.com) had a
> custom function (numberformat) that will format numeric fields in a
> variety of user specified formats.

It was still there and may work. Though he says only with a fixed amount
of digits (which is kind of OK), but may only work with ten digits,
where I'd prefer eight, as that's standard in Denmark where I live
(population 5,5 million).

Will try out tomorrow if I can tweak it to work for me!

:-) Esben

Mail: nameasofabove_h@get2net.dk

Re: Room inbetween pairs of characters

am 16.09.2007 12:27:33 von esha

Esben wrote:

> Tom Stiller wrote:

> > > > Can Filemaker 9 Adv. generate room inbetween pairs of characters like
> > > > phonenumbers - and still have the field be normally searchable and
> > > > sortable? So the space is "cosmetic" or non-existent on the logical
> > > > level - is that possible?
> > >
> > > Maybe I was unclear: what I want is to have users enter a phonenumber
> > > like:
> > >
> > > 12345678
> > >
> > > but for instance end with it automatically looking like this
> > >
> > > 12 34 56 78
> >
> > I don't know if the same custom function is available in FM9 as was
> > available for FM7, but Database Pros (http://www.databasepros.com) had a
> > custom function (numberformat) that will format numeric fields in a
> > variety of user specified formats.

Just wanted to share the solution from above here ( and ask how I make
this conditional on number of digits?):

John Osborne writes:

"Let(
NumbersOnly = Filter(Phone Number; "0123456789");
"(" & Left(NumbersOnly; 3) & ") " &
Middle(NumbersOnly; 4; 3) & "-" &
Right(NumbersOnly; 4)
)

// The trick is to remove everything but the numbers. When this is done,
you can add back whatever formatting you want. This simple formula only
works with 10 digit numbers. In order to work with more or less digits,
you will need to write a conditional formula that considers all the
possibilities."

His number function would result in

In my case (8 digit numbers) the solution looks like this:

Let(
NumbersOnly = Filter(Phone Number; "0123456789");
Left(NumbersOnly; 2) & " " &
Middle(NumbersOnly; 3; 2) & " " &
Middle(NumbersOnly; 5; 2) & " " &
Right(NumbersOnly; 2)
)

But how do I make this conditional on number of digits, so that it only
happens when there are exactly 8 digits entered - Else Let [be as
entered]....

Thx in advance!

:-) Esben

Mail: nameasofabove_h@get2net.dk