I need to validate if the text entered in a text column is written in UPPER CASE.
|
|
In my case I wanted to validate a 4 to 5 field Identifier named IS. The IS field should contain 4 to 5 Upper case letters. I did it using ASCII code. Sum must return a value of 12. lower case letters sum less than 12, in that case sentence returns false: =IF(((CODE(MID(IS,1,1))>47)+(CODE(MID(IS,1,1))<58)+(CODE(MID(IS,1,1))>64)+(CODE(MID(IS,1,1))<91)+(CODE(MID(IS,2,1))>47)+(CODE(MID(IS,2,1))<58)+(CODE(MID(IS,2,1))>64)+(CODE(MID(IS,2,1))<91)+(CODE(MID(IS,3,1))>47)+(CODE(MID(IS,3,1))<58)+(CODE(MID(IS,3,1))>64)+(CODE(MID(IS,3,1))<91)+(CODE(MID(IS,4,1))>47)+(CODE(MID(IS,4,1))<58)+(CODE(MID(IS,4,1))>64)+(CODE(MID(IS,4,1))<91))=12,TRUE,FALSE) The formula verifies if the letters are between A~Z excluding from a~z,0~9. i.e. Writing in the IS field the identifier "elap" {8} returns false Writing "ELAP" {12} returns True In this case this worked just fine, but i'm still open to improvements. Thanks for helping |
|||
|
|
|
You'll probably need something similar to this - http://sharepointsolutions.com/sharepoint-help/blog/2011/12/how-to-validate-strict-text-formats-in-sharepoint-2010/ You'll find examples on how to validate on upper case strings by googling. Ricky Spears has written good blogs about how to create validation regexs for Column Validation - Read more here |
|||
|
|
