Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2008

Tip: Looking for answers? Try searching our database.

InfoPath - insert hypens automatically into Social Security Number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mikew - 07 Jan 2008 14:35 GMT
Hi,

I'm trying to make a Social Security Number field in which the user can type
123121234 and upon exiting the field, the field automatically inserts hyphens
so that it becomes 123-12-1234.  How do I do this?  The Social Security
Number pattern in rules limits the user to having to insert hyphens
him/herself.  I want this done automatically.  How do I do this?  Thanks.
Clay Fox - 07 Jan 2008 16:31 GMT
Hey Mike.

Add a rule to your field.
Make the condition does not match pattern and select SS#.  This way if it is
entered correctly it will be left alone.
Then for the action hace set field value pointed at itself.
Enter this formula.
concat(substring(., 1, 3), "-", substring(., 4, 2), "-", substring(., 6, 4))
This will insert the dashes.

Signature

Thanks

Clay Fox

Qdabra Software
http://www.qdabra.com

InfoPathDev.Com
The Largest InfoPath Forum in the World
http://www.infopathdev.com

> Hi,
>
[quoted text clipped - 3 lines]
> Number pattern in rules limits the user to having to insert hyphens
> him/herself.  I want this done automatically.  How do I do this?  Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.