city(
city(
ZIPCODE
)

The city( function looks up the name of a city associated with a US zip code.

Parameters

This function has one parameter:

zipcode – is a US 5 digit zip code. You can specify the zip code either as a number or as text.

Description

The function returns the name of the city associated with a US zip code. If there is more than one possible name, the function returns the primary zip code name as defined by the US Post Office. If there is no zip code with the specified number, the function will return `"-"`.

    city(92648) ☞ Huntington Beach
    city("20401") ☞ Washington
    city(99999) ☞ -

One primary use for the city( function is to enter the city automatically when the zip code is entered, saving keystrokes and reducing the probability of data entry errors. This example assumes that the database has a ZipCode field that contains text. The example uses a text funnel to strip off any extra characters in the zip code (for example 9 digit zip codes).

    City=city(ZipCode[1,5])

Another use for the city( function is to double-check data entry. This example locates all records where the zip code does not match the city name.

    select City <> city(ZipCode[1,5])

See Also

- cityzip( -- returns the lowest zip code associated with a city.
- cityzips( -- returns a list of zip codes associated with a city.
- county( -- returns the name of the county associated with a US zip code.
- mapurl( -- returns a URL to display a map location.
- openmapwindow -- opens a window displaying a map of a location.
- openwebmap -- opens a web browser window displaying a map of a location.
- selectzipdistancetool -- selects records near the current record, based on zip codes.
- state( -- returns the name of the state associated with a US zip code.
- stateabbreviations( -- returns a list of US state abbreviations.
- statelookup( -- converts a two letter abbreviation for a US state into the full state name.
- statename( -- converts a two letter abbreviation for a US state into the full state name.
- uspssecondaryunits( -- returns a list of USPS (United States Postal Service) secondary suffix designation abbreviations.
- uspsstreetsuffixes( -- returns a list of USPS street suffix abbreviations.
- zipdistance( -- calculates the distance between two zip codes.
- ziplatitude( -- returns the latitude of a US zip code.
- ziplongitude( -- returns the longitude of a US zip code.

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.