Column Validation for Phone Number Code?

%3CLINGO-SUB%20id%3D%22lingo-sub-16918%22%20slang%3D%22en-US%22%3EColumn%20Validation%20for%20Phone%20Number%20Code%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-16918%22%20slang%3D%22en-US%22%3EDear%20SP%20Gurus%2C%3CBR%20%2F%3EDoes%20anybody%20know%20the%20rule%20I%20need%20to%20place%20in%20the%20phone%20number%20column%20settings%20so%20I%20can%20valadate%20a%20user's%20entry%20of%20a%20phone%20number%3F%3CBR%20%2F%3EI%20would%20like%20it%20to%20be%20in%20the%20following%20format.%3CBR%20%2F%3E555-555-5555%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20your%20help%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-16918%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-17256%22%20slang%3D%22en-US%22%3ERe%3A%20Column%20Validation%20for%20Phone%20Number%20Code%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-17256%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Vipin%2C%26nbsp%3B%3C%2FP%3E%3CP%3EIsn't%20there%20a%20way%20that%20the%20field%20makes%20sure%20that%20the%20user%20types%20it%20in%20the%20right%20format%20the%20first%20time%3F%3C%2FP%3E%3CP%3EI%20thought%20that%20is%20what%20validation%20does%3F%3C%2FP%3E%3CP%3EWhat%20I%20am%20trying%20to%20avoid%20is%20users%20forgetting%20to%20type%20in%20the%20are%20codes%2C%20my%20staff%20have%20been%20forgetting%20the%20dashes%20too!%3C%2FP%3E%3CP%3EI%20am%20getting%20a%20lot%20of%20different%20variations%20of%20phone%20numbers.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-17058%22%20slang%3D%22en-US%22%3ERe%3A%20Column%20Validation%20for%20Phone%20Number%20Code%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-17058%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EYou%20can%20achieve%20this%20by%20using%20calculated%20column.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecreate%202%20columns%26nbsp%3B%3C%2FP%3E%3CP%3E1.ContactNumber%20-Single%20line%20of%20text(for%20example).%3C%2FP%3E%3CP%3E2.Phone%20Number%20-Calculated%20Column(to%20show%20actual%20Phone%20Number).%3C%2FP%3E%3CP%3EInsert%20following%20formula%20in%20Phone%20Number%20formula%20field%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3DTEXT(ContactNumber%2C%22000-000-0000%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20on%20default%20view%2C%20you%20can%20hide%20Contact%20Number%20Column.%3C%2FP%3E%3CP%3ECreate%20a%20new%20Item%20and%20you%20done.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F5076i0A4C80F7B10E7B46%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Screenshot_1.jpg%22%20title%3D%22Screenshot_1.jpg%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EInsert%20data%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F5077iE41149E056E8FCB0%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Screenshot_2.jpg%22%20title%3D%22Screenshot_2.jpg%22%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-caption%22%20onclick%3D%22event.preventDefault()%3B%22%3EYour%20Final%20View%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECheers%20!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor
Dear SP Gurus,
Does anybody know the rule I need to place in the phone number column settings so I can valadate a user's entry of a phone number?
I would like it to be in the following format.
555-555-5555

Thanks for your help
2 Replies
Highlighted

Hi,

You can achieve this by using calculated column.

 

create 2 columns 

1.ContactNumber -Single line of text(for example).

2.Phone Number -Calculated Column(to show actual Phone Number).

Insert following formula in Phone Number formula field

 

 =TEXT(ContactNumber,"000-000-0000")

 

 

Now on default view, you can hide Contact Number Column.

Create a new Item and you done.

Insert dataInsert data

 

 

Your Final ViewYour Final View

 

 

Cheers !

 

Highlighted

Thanks Vipin, 

Isn't there a way that the field makes sure that the user types it in the right format the first time?

I thought that is what validation does?

What I am trying to avoid is users forgetting to type in the are codes, my staff have been forgetting the dashes too!

I am getting a lot of different variations of phone numbers.