Approach User Support homepage Approach User Support
Answers to Frequently Asked Questions about Lotus Approach
Examples LotusScripts
Example databases
Links to other Lotus Approach support services

[Return to contents]

Phone numbers

Last updated: 14 Feb 1999

If all the phone numbers in your database have uniform formatting eg. (xxx) xxx-xxxx in the USA, then you can store the phone numbers a numeric field and set the field box to display them in the desired format. To do this go into Design mode, click on the numeric phone number field. When the InfoBox appears, click on the '#' tab, and select 'numeric' format type. Then click on 'Edit format' and enter (000) 000-0000 in the format code.

If you are importing phone numbers from another application they may be stored as text fields containing both text and numbers eg. "(205) 765-4321". You can either import them into a text field, or use find and replace to remove all the unwanted characters, and then import them into a numeric field.

If you have phone numbers in an Approach database in a text field, you can convert them to a new numeric field using Left, Right and Mid functions in a SET command in a looping macro: eg: to convert (205) 765-4321 from a text field (say 'TextPhoneNumber') to numeric format, set the numeric field to:


    Middle(TextPhoneNumber, 2, 3) * 10000000
       + Middle(TextPhoneNumber, 7, 3) * 10000
       + Middle(TextPhoneNumber, 11, 4)

(also see article 'Looping Macros' in this FAQ)

[Return to contents]

© Copyright, JohnBrown, Trademarks, Disclaimer, Acknowledgements.