Region Post Code Converter

To correctly handle the Zip is not unique for the Post place option, we have changed the way of storing postcodes and cities in the database.

Previously, a post place was identified by a postcode and a country code. This required a postcode to be unique to automatically identify a post place. In some countries, a postcode is not unique. In this respect, it was decided to enter a postcode and a post placed in a single string making it impossible to identify the place.

Starting from version 2019.1, to solve the issue, a city is stored in a separate address field labeled as a post place.

In the postcode table, the primary key is expanded with a post place and consists of Country, Post Code, and City.

Functionality

To get started, switch to the Region Editor Module and click Convert Post Codes in the Control group. This causes the Region Post Code Converter dialog to appear:

First, select the country for which you want to convert a postcode using one of the methods below:

  • Enter a country code or type in just part of a word, for example, "or" and you will get all sorts of results that include this word. Select a country from the hinted results.

-or-

  • SelectAll countries if you want to handle all the postcodes in the database.



On selecting, click Load to view all the postcodes available for the country(-ies) in the database:

From the Preset drop-down, select the conversion rule based on the data that the current postcode and post place may consist of:

  • <Digit Post Code> <whitespaces> <Post Place>is used for numeric postcodes and textual post places separated by spaces.

  • <Non-whitespace Post Code> <whitespaces> <Post Place>is used for the postcodes composed of any symbols apart from spaces and textual post places. The postcode and post place are separated by spaces.

  • <Post Place> <whitespaces> <Digit Post Code>is used for textual post places and numeric postcodes separated by spaces.

  • <Digit Post Code with whitespaces> <whitespace> <Post Place>is used for numeric postcodes with spaces and textual post places. The data is separated by a space.

You can establish your own conversion rules with the help of regular expressions. Take a chance to familiarize yourself with the regular expressions by clicking the built-in help note.



When defined, the conversion rule becomes available in the Define conversion rule field and the Preview grid displays the suggested conversion data for the new postcode and posts place. Carefully review all the suggested data and select only those that seem to be correct.

  • To select all the records in the Preview grid, click Tag and select the Tag all option.

  • To clear the selection, click Tag and select the Untag all option.

  • To select all the records with suggested conversion results, click Tag and select Tag non-empty new codes.



After that, click Process to initiate the conversion. If the conversion is successful, the system shows the Postcode is converted status:

The database is then updated with a new postcode and post place.