Newbies 3Stan Posted August 5, 2008 Newbies Posted August 5, 2008 hi! im new in filemaker and i have a problem with my project. here in the philippines we have a area code with 3 digits and 2 digits, something like this: (046)123-4567 & (02)123-4567 my calculations for my 3 digits area code is like this: "(" & left (text; 3) & ")" & middle (text; 4; 3) & "-" & Right (text;4) the problem is when I enter a 2 digits area code. can anyone help me with my problem? I want both 2 digits & 3 digits area code enter with no problem. Thanks in advance! i hope you got what im trying to say. :
comment Posted August 5, 2008 Posted August 5, 2008 Try: "(" & Left ( text ; Length ( text ) - 7 ) & ")" & Middle ( text ; 4 ; 3 ) & "-" & Right ( text ; 4)
Newbies 3Stan Posted August 5, 2008 Author Newbies Posted August 5, 2008 thanks for the reply. but there's still a problem. when i enter 021234567 it will return to this (02)234-4567 that supposed to be like this (02)123-4567
RodSierra Posted August 5, 2008 Posted August 5, 2008 Try this: "(" & Left ( phonefmt2::PhoneNo ; Length ( phonefmt2::PhoneNo )-7 ) & ")" & Middle ( phonefmt2::PhoneNo ; Length ( phonefmt2::PhoneNo ) - 6 ; 3 ) & "-" & Right ( phonefmt2::PhoneNo ; 4 )
comment Posted August 5, 2008 Posted August 5, 2008 Sorry, I missed the middle part. Just apply the same principle of counting from the end: ... & Middle ( text ; Length ( text ) - 6 ; 3 ) & ...
Recommended Posts
This topic is 6013 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