How to make automatic zip code converter system

How to make automatic zip code converter system

Hi there, 

I have question about how to make automatic zip code autofill system from input state and city in the text box.
For example, customers, their information insert page, they input their name, address, phone and so on. Especially for the address, I was wondering if I could make address form which state and city was input in the textbox, then zip code textbox will be automatically filled in its textbox. Do they heve those function on the outsystems?

Another question is that I know that I can use on Javascript on the vidual studio, which system I could search on the google and find. It makes easily to build that function because of I could use premade package of the system. Can I import this partiqular function into outsystems? If so how can I setting up?



Zip Codes is something where you can't escape the hard work of form filling. You have two options to try.
One is to connect to your national postal service and ask the zip code of the address. If they don't have that webservice, you need to load the full list into your site and keep it updated (based on the portuguese mail, the list is enourmous and you don't want to do such).
Assuming every country (and possibly state) has it's own list - different formats, different webservices address - you probably will get and headache before completing.

The second option is to connect to Google Maps and trust its approach. It's not as exact/updated but will do.

You can load javascript into OS , but I doubt you can get an autofiller. The most probable is that you get a validator.
Here's some background of work that I've done in this area on systems I've implemented pryor to working with Outsystems.  Hopefully some of this will help you.  All my comments are based on US zip codes but I believe apply to other countries as well.

Large cities have many zip codes.  Think of New York City where there are a huge number of zip codes.  Having the user enter the city, state and country (if needed) would not allow you to determine which zip code is the correct one.  The better approach is to have the user enter the zip code and then do a look up in a table or web service to produce the city, state and country (if needed).  This always produces one and only one value since zip codes are unique.  This will be much more beneficial to the user and will save typing.  

In the US the postal service has a free web API for doing this kind of thing.  Details can be found at  If performance is a concern I recommend downloading a full file of zip code data and import it into Outsystems.  This can be obtained for free from   If you wanted to do complete address verification there is a service at that provides all sorts of address verification tools for a small fee. (I have no affiliation with any of the orgainzations mentioned.) 

For simplicity sake, for a project I'm starting, I will be implementing the imported data option using the file from zipcodedownload.  It's about 45,000 small records and is easily imported using the bootstrap process.  From there it's an easy lookup process to do what you want.

As noted in the previous post, if you are trying to do this for multiple countries it gets much more complicated, as the formats are different, but it is doable.  For example, Canada is alpha numeric in the format 'XXX YYY'.  If your table contains both US and Canadian zip codes you can do the lookup and then, based on the country field, display the zip code in the correct format using 'if' blocks.

Hope this helps.
For US based zipcodes, the US Census puts out a free list.  That can be found here:

Thank you guys for showing me so really good informations. 

Nuno's told me one, "Google Place Autocomplete Address Form", looks good for me.
Now I tried import Java script on my existing outsystems project, and then I tried to add the autofill form in my original address edit page, like... I addeted attachemnt screen shot.

As a result of that, I still have trouble to work correctly. And I am tring to find out using web, but how to insert, I am really not sure what I should do exactly. I am wondering if you could guys tell step by step about how to insert Javascript source code to outsystem project. If my way, which I did so far,  is wrong, please suggest me to way how to do alternative way from scratch and step by step.