• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1476
  • Last Modified:

Sharepoint Foundation 2010 List Field Validation formula

I have spent the better part of an afternoon working on a list form. I want a Single Line of Text field to have a mininmum of 5 Characters. The characters will be two to three numbers to begin with then a username such as: 370jbrown.  The five character minimum will attempt to deter them from typing their ID followed by two letters of their name.

My formula which doesn't work is: =([Trainee's ID Badge]>5)  or =[Trainee's ID Badge]>5.
Neither work. My guess is the formula is doing math and not number of characters.

what would the validation formula be to count the number of characters entered, rejecting the entry if it is less than 5?
0
KellyOConnor
Asked:
KellyOConnor
  • 3
  • 2
1 Solution
 
Rainer JeschorCommented:
Hi,
try this:
=LEN([Trainee's ID Badge])>5

Open in new window


HTH
Rainer
0
 
KellyOConnorAuthor Commented:
Thanks Rainer, that did the trick! I tried a few combinations of LEN but could never get it to work. If you have any good links to articles that explain any of this in a manner a non programmer can understand, I'd apprectiate it.
0
 
Rainer JeschorCommented:
Hi Kelly,
a good starting point is:
http://msdn.microsoft.com/en-us/library/bb862071.aspx
and
http://office.microsoft.com/en-us/windows-sharepoint-services-help/examples-of-common-formulas-HA001160947.aspx

What I normally do is
a. test the function in Excel
because as long as you use common basic functions they are supported
b. verify the formula from a spelling view  (brackets, opening / closing () in a text editor or Excel

HTH
Rainer
0
 
KellyOConnorAuthor Commented:
Great! thanks for the extra information, much appreciated. I wasn't aware that the same formulas for Excel would work.
0
 
Rainer JeschorCommented:
Hi,
they do, but it is only a small subset of the available functions in Excel. But you can easily simulate before testing in Sharepoint.
KR
Rainer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now