Is the number of characters entered (not counting the colons) always the same?
Let ( St = Substitute ( self ; ":" ; "" ) ; // remove any : characters entered by user
Left ( St ; 2 ) & ":" &
Middle ( St ; 3 ; 2 ) & ":" &
Middle ( St ; 5 ; 2 ) & ":" &
Middle ( St ; 7 ; 2 ) & ":" &
Middle ( St ; 9 ; 2 ) & ":" &
Middle ( St ; 9 ; 2 )
) // Let
This can be set up as an auto-enter calculation if you clear the "do not replace existing value..." check box.
If the number of characters can vary, a looping script or recursive calculation would be needed to adapt this to a varying length of characters.
Where do I paste this at? There will always be the same amount of Characters in the field. And would you also know how to do it for another field for an ip address as in putting the . between the numbers. Ex. 192.168.1.1
Thanks for the help!!
Find the field in Manage | database | fields
Double click it
Click the auto-enter tab
Click the calculation button.
Click to clear the "do not replace existing value...." check box.
Click OK to close dialogs until you are back to the main database window.
Note: This will not modify existing data in any existing records. It will only affect what is in this field when you edit or enter data after making this change.
For the IP address, I don't think this method will work unless you can guarantee that the number of digits between periods is always the same. If you can then you should be able to modify the expression that I have already posted to do what you need.