August 5, 200817 yr Newbies 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. :
August 5, 200817 yr Try: "(" & Left ( text ; Length ( text ) - 7 ) & ")" & Middle ( text ; 4 ; 3 ) & "-" & Right ( text ; 4)
August 5, 200817 yr Author Newbies 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
August 5, 200817 yr Try this: "(" & Left ( phonefmt2::PhoneNo ; Length ( phonefmt2::PhoneNo )-7 ) & ")" & Middle ( phonefmt2::PhoneNo ; Length ( phonefmt2::PhoneNo ) - 6 ; 3 ) & "-" & Right ( phonefmt2::PhoneNo ; 4 )
August 5, 200817 yr Sorry, I missed the middle part. Just apply the same principle of counting from the end: ... & Middle ( text ; Length ( text ) - 6 ; 3 ) & ...
Create an account or sign in to comment