Dec 15
Mark Stevens (Steve) Willis Custom function for USPS address standards
Dec 15, 2009; 14:06
Mark Stevens (Steve) Willis
Custom function for USPS address standards
Hi, all!
I've tried to write a custom function that converts an address to USPS standards, specifically it converts:
* ROAD to RD
* COURT to CT
* STREET to ST
* AVENUE to AVE
* SUITE to STE
* EAST to E, WEST to W, and so on for NORTH and SOUTH
etc, etc. as well as stripping all periods and commas and uppercasing the entire address.
I do this with a series of Substitute() functions on the address
Let[ result = Upper( address ) ;
result = Substitute( address ; "ROAD" ; "RD" );
result = Substitute( address ; "COURT" ; "CT" )
etc.
]
The problem is that I am having results appear like COURTNEY turning into CTNEY and BROADWAY into BRDWAY because the Substitute() function is looking for a string of characters with complete disregard for word boundaries. I've also got a problem with things like NORTH ST turning into N ST.
The USPS website has a converter that uses an algorithm that has solved these issues, but it is not something that can be run from within FMP.
Is there another function, custom or otherwise, that will either: 1) replace what I am trying to do, or; 2) would work in conjunction with what I am already doing (IOW, replacing the Substitute function within my custom function)?
I'm willing to pay a reasonable price, if necessary, for someone to write something, if this cannot be done natively in FMP, or the FMP coding becomes too convoluted.
If I can make this work within the confines of FMP's scripting language, I was planning on posting it for free access on Brian Dunning's site.
Can anyone help me?
--
Steve Willis
stevewillis at mac.com
--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/FileMaker/Browse/
Manage your subscription: http://www.ListSearch.com/FileMaker/
Dec 15
Michael Gilman Re: Custom function for USPS address standards
Dec 15, 2009; 14:10
Michael Gilman
Re: Custom function for USPS address standards
Dec 15
James McAlister Re: Custom function for USPS address standards
Dec 15, 2009; 14:42
James McAlister
Re: Custom function for USPS address standards
Dec 15
James McAlister Re: Custom function for USPS address standards
Dec 15, 2009; 14:42
James McAlister
Re: Custom function for USPS address standards
Dec 15
Jimmy Jones Re: Custom function for USPS address standards
Dec 15, 2009; 15:20
Jimmy Jones
Re: Custom function for USPS address standards
Dec 16
andy knasinski Re: Custom function for USPS address standards
Dec 16, 2009; 13:50
andy knasinski
Re: Custom function for USPS address standards