You need to sign in to do that
Don't have an account?

Initial Upper Case Formula
Hi,
I would like the data in the first line of the address field to look like
10 Downing Street.
Is there a way to capitalise the initials using formula?
Many thanks,
By writing validation rule and use UPPER(Street). It'll enforce users to enter infromation in upper case.. Alternatively you can write workflow to update the Street when record created/edited.
Thanks for your reply.
I don't really want to replace the whole line of street to UPPER CASE, I only want the initial of street names (non numeric) to be Upper case.
Thanks,
Street field length is 80 I think, Build logic where we check LEFT(n) with Left(n-1) and whenever Left(n-1) is equal to blank. Change Left(n) to UPPER (Left(n)
Have done that already - UPPER(LEFT(Street,1))&LOWER(Mid(Street, 2, Len(Street)-1))
but that only returns the first letter to uppercase and the rest to lower and it doesn't work if there is a numeric values in the street too.
With the formula above
10 Downing Street will look 10 downing street and Downing Street will look Downing street.
That's not exactly what I am after, I am afraid.
Thanks for your replies anyway.
Hi,
You can try the below code in the before update trigger.
String s = a.MailingCity;
List<String> varMailingCity = s.split(' ');
for(Integer i=0;i<varMailingCity.size();i++)
{
varMailingCity[i] = (varMailingCity[i].substring(0,1)).toUppercase() +(varMailingCity[i].substring(1,varMailingCity[i].length()));
}
Now the varMailingCity contains as you expected.
Hope this helps.
Thanks
Sureka
So 100 tom boyd drive = 100 Tom Boyd drive
It will not get the 3rd and forth name in the street field. But i am sure it can be fixed with some editting.
IF(
FIND(" ", Street ,1)=0,
UPPER(LEFT(Street ,1))&MID(Street ,2,100),
IF(
FIND(" ",MID(Street ,FIND(" ",Street ,1)+1,LEN(Street )-FIND(" ",Street ,1)))=0,
UPPER(LEFT(Street ,1))&
MID(Street ,2,FIND(" ",Street ,1)-1)&" "&
UPPER(MID(Street ,FIND(" ",Street ,1)+1,1))&
MID(Street ,FIND(" ",Street ,1)+2,100),
UPPER(LEFT(Street ,1))&
MID(Street ,2,FIND(" ",Street ,1)-1)&" "&
UPPER(MID(Street ,FIND(" ",Street ,1)+1,1))&
MID(Street ,FIND(" ",Street ,1)+2,FIND(" ",MID(Street ,FIND(" ",Street ,1)+1,LEN(Street )-FIND(" ",Street ,1)))-1)&
UPPER(MID(Street ,FIND(" ",MID(Street ,FIND(" ",Street ,1)+1,LEN(Street )-FIND(" ",Street ,1)))+FIND(" ",Street ,1)+1,1))&
MID(Street ,FIND(" ",MID(Street ,FIND(" ",Street ,1)+1,LEN(Street )-FIND(" ",Street ,1)))+FIND(" ",Street ,1)+2,100)))
@Justin Dover, Thanks for the formula and inserted in formula field and got the output. But need some breif because it is working for 3 words of a sentence but i need for 10 words in a sentence should be in proper case.
Unable to edit the logic with lot of confusion please can you suggest me