Formatting telephone numbers with spaces

Johannes_NielsenJohannes_Nielsen Member Posts: 206
My users requests an alternate output of telephone numbers. They would like a number like +463205783221 to be displayed and formatted like this "+46 32 05 78 32 21" so it's easier to dial when read on screen.

(they have been adding spaces (and what not) manually, but this breaks the search dialog fuction on list forms, so we are cleaning up the numbers now)

A solution might be to connect our phones to the computers and dialing directly from the screen (softphone). :-k

But until then I'm considering making a modification on the Contact Card Form:

How should I go about this? I have found no obvious formatting feature, to use for this. :|

As a crude work around, I'm thinking of simply adding a single Label to the form, showing the number with this formatting, inserting the spaces with CAL. That way the regular Input Field remains unchanged.

Are there any other, recommendable ways, to do this sort of thing?
Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-841

Comments

  • SavatageSavatage Member Posts: 7,142
    assuming the phone no. starts with a "plus"
    ie/ +463205783221

    then you could add a new field to the table or variable to the form
    PhoneEasyRead type TEXT

    PhoneEasyRead := FORMAT(COPYSTR("Phone No.",1,3)+' '+COPYSTR("Phone No.",4,2)
    +' '+COPYSTR("Phone No.",6,2)+' '+COPYSTR("Phone No.",8,2)
    +' '+COPYSTR("Phone No.",10,2)+' '+COPYSTR("Phone No.",12,2));

    or if you want the string to add the "+" then you'll have to adjust the COPYstr parameters a bit.
  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    Thanks alot Savatage!
    Wow, and you also did the coding for me 8)
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
Sign In or Register to comment.