Jump to content

Proper Case = Bad Address


Recommended Posts

Good Day folks!


I've got a proper case question:


var Var1 = "Address_1"


return ToTitleCase(Field(Var1));


That one works fine, but I just came across an address that started with "NE 1st Street"


As in Northeast 1st street, but it outputs as Ne 1st Street...


Any idea how to get the compass directions all caps?

Link to comment
Share on other sites

I think that your best bet to have a valid mailing address, at least for the USPS, is to use ALL CAPS, not Title Case. So I would do this:

return ToUpper(Field("Address_1"));

Beyond that, keep in mind that using the rather simplistic ToTitleCase string processing function to cleanse your data is perilous, as there are many, many exception cases where proper names do not conform to "title case" logic, such as "McFly". Here's one of my rants about this from the old email list:



You could theoretically apply the same kind of exception case logic as in that post, with a list of exceptions like NE, NW, SE, SW, etc., but I still don't recommend doing this, as you will undoubtedly find other kinds of street names (e.g. "Avenue of the Americas" or "Mies van der Rohe Way") where forcing a particular mixed case style is simply not appropriate. Again, for addresses especially, ALL CAPS is your best bet.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...