You need to sign in to do that
Don't have an account?
Sapamrm
Force users to put data in capitals
I would like certain fields in our sfdc-environnement only to be filled with data in capital letters. So from the moment users input data that is not in capitals, they should get an error message when trying to save the record.
Is this possible?
Thanks in advance!
I got the answer on another discussion board! This works perfectly!
NOT(REGEX(field__c, "[A-Z]+$"))
All Answers
While saving you can make changes in the string by using string.toUpperCase() method.
Or you can write a JavaScript on lost focus event of input field.
I presume using the string.toUppercase() method involves some coding.
Is it possible to achieve this by using a simple validation rule and formula?
I tried using the formula LOWER() ; the validation rule works fine if as long as all the letters are not in capitals. From the moment the first letter is in capitals, the validation rule does not work anymore.
Any idea how I could fix this, so that the validation rule evaluates to true as soon as 1 letter in the name is not a capital?
Did you tried UPPER?
Check out following documentation:
https://na1.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf: https://na1.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf
I got the answer on another discussion board! This works perfectly!
NOT(REGEX(field__c, "[A-Z]+$"))
Where did you put that regular expression to verify the user was putting in all caps?