The zipinfoplus statement queries the web to obtain information about a zip code.
This statement has six parameters:
address1 – first line of the address.
address2 – second line of the address.
city – name of city.
state – two letter state abbreviation.
zip – five digit zip code (optional, can be left empty).
zipplusinfo – Name of a field or variable that will receive a dictionary with information about the address (see discussion below)
This statement queries the web to obtain information about a zip code. The information is returned in a dictionary that will contain one or more of the values listed below:
ADDRESS ☞ Corrected street address CITY ☞ The primary name of the city associated with this address STATE ☞ State associated with this address ZIP9 ☞ Nine digit zip code COUNTY ☞ Name of the county associated with this address CARRIERROUTE ☞ Carrier route number associated with this address
This example checks an address in the database to see if it is correct. If it is completely invalid, an error message is displayed. If it is not formatted correctly by USPS rules, the database is corrected.
local zinfo,correctAddress zipinfoplus Address,"",City,State,Zip,zinfo correctAddress=getdictionaryvalue(zinfo,"ADDRESS") if correctAddress="" message "Address is not valid!" rtn endif if correctAddress=Address rtn endif Address=correctAddress
|10.0||No Change||Carried over from Panorama.|