Zip Code Lookup from Address


For a given address, lookup the Zip code on the USPS web site and fill in the current record.


Used with the Grid and UX components


var rowNum = {grid.object}._selectedRow;

Zip Code Lookup

City field name

Specify the name of the City field.

State field name

Specify the name of the State field.

Address 1 field name

Specify the address field

Address 2 field

Specify the address 2 field (if any).

Zip code field name

Specify the name of the Zip field. This field is filled in with data that is looked up on the USPS web site.

Zip code format

Specify if you want a 5 digit or 9 digit zip code to be returned.

Find a US Zip Code by Entering City and State Data.

  1. In the UX Builder on the UX Controls page open the 'Data Controls' menu. Click on the [TextBox] option to add a textbox control to the component. Give the textbox the name and label 'City'.

  2. Click on the [TextBox] option in the 'Data Controls' menu a second time. Name and label this textbox control 'State'.

  3. Add a third [TextBox] control to the component. Name and label this control 'Zip'.

  4. Highlight the 'State' textbox control in the controls tree. Open the 'Other Controls' menu and click on the [Button] option to add a button control under the 'State' textbox.

  5. Highlight the button control in the controls tree. In the properties list on the right in the Button Properties section set the 'Button text' property to read 'Find Zip'

  6. Scroll down to the 'Javascript - (Touch, Mouse, Pointer Events)' section and click the [...] button next to the 'click' property.

  7. In the Edit Click Event dialog select the 'Action Javascript' option from the radio control choices. Click the 'Add New Action' button.

  8. Type 'zip' into the Filter list and highlight the 'Zip Code Lookup from Address' action in the actions list. Click OK.

  9. Click the dropdown next to the 'City field name' property in the 'Zip Code Lookup from an Address' action properties list. Select the 'City' textbox.

  10. Click the dropdown next to the 'State field name' property. Select the 'State' textbox.

  11. For the 'Zip code field name' property select the 'Zip' textbox and click OK and Save to exit.

  12. Run the component in Live Preview. Enter the name of a City and its respective state into the city and state textboxes. Click the 'Find Zip' button. The Zip code for that city should appear.


See Also