You need to sign in to do that
Don't have an account?
glowitz
HELP! - Forcing Uppercase on Field Entry Using Validations & Formulas
I have professional edition (so can't use Apex triggers) and was looking for a simple way to force all caps (uppercase) on a form field entry using validation rules. For example, if we want all our account names to be uppercase, how can this be formatted automatically?
Ideally this would work without any error messages -- it would just reformat it upon "saving" it. Also, will this work when using the "web to lead" or "web to case" form?
Ideally this would work without any error messages -- it would just reformat it upon "saving" it. Also, will this work when using the "web to lead" or "web to case" form?
We want this to be handled directly in SFDC, not in our client or server-side application.
Thanks in advance for tips / recommended code or formula. I posted a similar request in the Ajax forum without realizing this was a more appropriate forum for my request. Thanks in advance for your help.
Thanks in advance for tips / recommended code or formula. I posted a similar request in the Ajax forum without realizing this was a more appropriate forum for my request. Thanks in advance for your help.
There is a new formula function, UPPER, that can do this for you. In a workflow field update, just set the result to UPPER(fieldname). You can search the online help for more information.
UPPER(text) and replace text with the field or expression you wish to convert to uppercase
Hope that helps.
Mark
Message Edited by Mark Silber on 05-15-2008 05:58 AM
Here's one approach, although it's not as comprehensive as I'd like:
If you could also change the last line to something like this:
in order to add a check that the last character is uppercase
Actually, after thinking about this more, here's a very simple formula that works everytime! This won't automatically change it, but it will validate it regardless of field length.
This seems to work:
name <> UPPER (name)
That's it. The validator compares the name as typed to the same name in all UPPER CASE. If these don't match, then it returns an error condition, and if you enter a text warning, it will warn the operator to enter the value in all caps. Now, if I could only make the data change iteself automatically, I'd be in hog heaven.
I created a workflow to check if the field was not all uppercase - field <> upper
Then created an immediate action to update that same field to all uppercase - (field name) upper (field name)
Works nicely