- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
05-14-2008 06:39 AM
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?
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.
05-15-2008 05:58 AM - edited 05-15-2008 05:58 AM
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.
Message Edited by Mark Silber on 05-15-2008 05:58 AM
05-16-2008 01:40 AM
05-18-2008 08:28 PM
Here's one approach, although it's not as comprehensive as I'd like:
or( left( Name,1)<>upper(left( Name,1)) ,left( Name,2)<>upper(left( Name,2)) )
If you could also change the last line to something like this:
,right( Name,1)<>upper(left( Name,1))
in order to add a check that the last character is uppercase
05-22-2008 08:40 PM
05-22-2008 08:49 PM
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.
03-25-2009 07:56 AM
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)