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?

Edited by strido
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...