Online Premium Trading Posted February 8, 2011 Posted February 8, 2011 Greetings all; I have phone numbers stored into the database, however some of them are formatted as (01) 2345 6789 and others are 01 2345 6789. What i want is it to check to see if it is formatted as "" and if so do this code "(" & Left ( ${Phone Number1 (Imported)} ; 2) & ")" & " " & Middle ( ${Phone Number1 (Imported)}; 4; 4) & " " & Right ( ${Phone Number1 (Imported)} ; 4) otherwise just copy the "phone number imported" to the field "phone number"
Raybaudi Posted February 8, 2011 Posted February 8, 2011 Isn't better to apply the same formula to ALL your records ? Something like: Let( n = Filter ( PhoneNumber ; 1234567890 ) ; If ( Length ( n ) = 10 ; "(" & Left ( n ; 2 ) & ") " & Middle ( n ; 3 ; 4 ) & " " & Right ( n ; 4 ) ) )
Online Premium Trading Posted February 8, 2011 Author Posted February 8, 2011 Sweet that worked, Thanks for the help.. Here is the coding i used incase anyone else wants the code. Let( n = Filter ( ${Phone Number1 (Imported)} ; 1234567890 ) ; If ( Length ( n ) = 10 ; "(" & Left ( n ; 2 ) & ") " & Middle ( n ; 3 ; 4 ) & " " & Right ( n ; 4 ) ) )
Online Premium Trading Posted February 8, 2011 Author Posted February 8, 2011 Greetings all; I have a database where phone numbers are entered, however some of the numbers are mobile and some are home phones. For example (07) 55555555 07 55555555 0400 000 000 What i want to do is make it so that if the field has a mobile number then it paste the number into the mobile field, if it has a home number then it paste it into the home number field. i was thinking about possibly making it so that if the number starts with 04******** then it is a mobile. However i dont know how to make the formular to check that.
bcooney Posted February 8, 2011 Posted February 8, 2011 Typically, all phone numbers are entered in the same field and a second field indicates their type (usually the choices of type are from a value list). I usually have phone in a child table to People.
Online Premium Trading Posted February 9, 2011 Author Posted February 9, 2011 Typically, all phone numbers are entered in the same field and a second field indicates their type (usually the choices of type are from a value list). I usually have phone in a child table to People. Yea, that isnt how this is going to be set up. So is there a way of searching and if it is one thing putting it on Filed A, if another Field B?
Recommended Posts
This topic is 5036 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now