Go to Manage | Database | Fields
Double click the entry for your phone number field to open the Field Options dialog
Click the validation tab.
Select the by calculation option.
Enter an expression that will evaluate as true if the correct number of digits have been entered:
Length ( Filter ( Self ; 0987654321 ) ) = 10
Thanks very much for your quick reply, is there anything that can be added to this that will valadate the mobile phone number on moving on to the next field and including the script i have found below.
I beleive the script below would change 0123456789 to 0123 456 789 is this correct?
@NumbersOnly = TextFormatRemove(Filter(Phone_Mobile; "0123456789"));
Length(@NumbersOnly) = 10;
Left(@NumbersOnly; 4) & "-" &
Middle(@NumbersOnly; 5; 3) & "-" &
What you have here is an auto-enter calculation that adds the parenthesis and dashes of a typical American style phone number. The validation calculation that I have specified will not be affected by the inclusion of this auto-enter calculation. That's why I've added the filter function so that the only characters counted are the numeric characters. Any additional characters such as () and - are ignored by the validation calc.
Thankyou very much for your time PhilModJunk,
Have a good weekend.