I saw some discussion of this on old posts. Is it possible now to force numeric editing for phones, and other numbers?
Example:
Phone: (999) 999-9999
SSN: 999-99-9999
I'm looking for a way to allow the user to enter the digits and the system to group and supply the dashes and parens.
All help appreciated.
Phone, SSN, and other formats
vinsnash,
I'm not sure of your exact requirements, but an easy way would be to have 2 attributes:
1a- PhoneInput - text 10
1b- Phone - text 13
You can then make a rule:
Customer.Phone='('+SUBSTRING(Customer.PhoneInput,0,3)+')'+SUBSTRING(Customer.PhoneInput,3,6)+'-'+SUBSTRING(Customer.PhoneInput,6,10)
Hope this helps.
Tom
I'm not sure of your exact requirements, but an easy way would be to have 2 attributes:
1a- PhoneInput - text 10
1b- Phone - text 13
You can then make a rule:
Customer.Phone='('+SUBSTRING(Customer.PhoneInput,0,3)+')'+SUBSTRING(Customer.PhoneInput,3,6)+'-'+SUBSTRING(Customer.PhoneInput,6,10)
Hope this helps.
Tom
A user may enter their own dashes and spaces, therefore I would add an intermediate attribute where you store a phone number cleaned up of user's non-numerical input
1aa - PhoneInputShort
and a rule
PhoneInputShort=REPLACE_PATTERN(PhoneInput,'[ .-]','')
Then use this PhoneInputShort in further formatting
1aa - PhoneInputShort
and a rule
PhoneInputShort=REPLACE_PATTERN(PhoneInput,'[ .-]','')
Then use this PhoneInputShort in further formatting
Phone, SSN etc.
A little late getting back. But thanks all that's very helpful.