While writing a new contact tracking screen, I wanted to make it easier to enter phone numbers, but have them in a consistent format, specifically ###-###-####. I have users who will use any of these formats, which I want to avoid.
###/###-####
###.###.####
(###) ###-####
I need to store the numbers in proper format to simplify raw data exports.
I wound up writing an Assignment process (/PD.A) called MY.ICONV.PHONE. It reassigns @VALUE to
OCONV(ICONV(@VALUE,"MCN"),"ML(#3-#3-#4)")
In the Field Definition F6, I set the Input Conversion to
(P("MY.ICONV.PHONE"))
In my /SD, I had to add the standard @REFRESH=2 in the Process After slot of the corresponding fields to update the displayed value.