Here's a basic one using a modified Phone Filter:
Left(Contacts::Home Phone;3) & " " &
Middle(Contacts::Home Phone;4;2) & " " &
Middle(Contacts::Home Phone;6;2) &" " &
But it needs to be modified to prevent users from entering non numbers, or entering more then 10 numbers
Thank you for your post.
Set up an Auto-Enter Calculation for the field. If you are sure there will only be digits and 10 characters, assuming the field is named Code, a possible formula would be:
Let ( C = Filter ( Code ; "0123456789" ) ; If ( Length ( C ) = 10 ; Left ( C ; 3 ) & " " & Middle ( C : 4 ; 2 ) & " " & Middle ( C ; 6 ; 2 ) & " " & Right ( C ; 3 ) ; Code ) )
Be sure to uncheck the option "Do no replace existing value of field (if any)".
In essence, I filter out any characters that are not digits, and then check to make sure the length is 10. If so, then I place one space between the third and fourth characters, the five and sixth characters, and the seventh and eighth characters. Otherwise, I leave the entry alone.
Let me know if you need additional clarification.