Postcode integration

hi guys I have a problem I want to integrate the official uk post code paf file for my area with sambapos I will upload the file but I don’t have a clue how I could do it as it has house no and house name as some properties have names instead of number also some houses have a number of flats with in it.
this is the link to download the paf file
http://uploading.com/me9de2a2/NW3-txt

i have never attempted this on SAMBAPOS 4… However, this was covered in Shampoos V3.

http://www.sambapos.org/wiki/doku.php/en/how_to_integrate_sambapos_to_post_code_databases

@emre, any comments?

hi morshed1
thank you for your reply i did have a look at that and my problem is that the example has only 3 or 4 fields ie postcode street and city i have a few more fields that need to be considered by the software i am baffled on how i could integrate it i have played around with it a bit but cant seem to get it to work but thanks for your prompt reply.

@esrefergisi It downloads a file named nw3.txt.exe

Please help us understand your exact issue. Tell us how your file is formatted, for example field names, what data each field contains, what custom fields you have and how you want to map extracted data to your custom fields. Also let us know what you’ve tried and what not worked. So we won’t suggest something you’ve already tried. If you share such details we can quickly suggest something without studying your data structure in advance. If it takes a lot of time to answer few people will pay attention on it.

hi emre
thanks for the reply well the post code list i have is like this well 19000 lines to be precise.
,1,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,10,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,12,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,14,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,3,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
basically the first part is the house numbers second is the street third is city fourth is postcode five and six are irrelevant.i have the original file in csv format.
well what i tried to do was like in the tutorial was to name the house no=$1 and street=$2 so on but it doesn’t seem to work i tried few more variations but no luck i don’t know if this is enough info but thanks for the reply emre.

,,,,,1,,"ELM ROW",,,"LONDON","NW3 1AA","S","77235"

If it is exactly formatted like that you should also take empty values into account. So ELM ROW data can be accessed with $8.

Sorry to bump up an old thread. But i have the exact same problem with a UK database.

I managed to get the database to working by following the sambapos 3 example using the query filed. My problem is, in the UK one postcode can have multiple door number, building number, or house name.

So if i type NW3 1AA it should allow me to choose which door number or house name i want before filling in the rest of the fields.

At the moment when a matching post code is found with multiple door number it just takes the last number in the csv file.

Also is there any way we can read this data from and sql table instead of reading from a csv file. The whole london database has 2 Million postcode.

hi Ash, have you manage the that proplem? it is kind of Postcode look up facility.

thanks

where do u getting the UK postcodes with street name and house number,…etc.

i dont neet all uk :smile: i need only a small town in wales

thanks

hi i have managed to sort the problem out thanks
you can get the postcode paf file from lots of re-sellers just google postcode paf file

Hi,

thanks for the quick answer back.

please could u let me know how do you sort it out when there are many address involved with the same postcode ?

because when i entered a postcode it is coming up only one address.

for example the postcode is like your NW3 1AA

,1,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,10,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,12,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,14,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”
,3,“ELM ROW”,“LONDON”,“NW3 1AA”,“S”,“77235”

from that data how do you get an option to choose one of them ?

thanks

i wasn’t able to implement the number feature my knowledge of samba is not that great but as i put the post code it does seem to recognize the street or road name but we have to manually write the house number or flat numbers.

thank u so much for the reply. I think i have to do it same way.

also when i google it about the paf. there is to much confusing about the price. do you know where can i buy it. i need only some local area for now. At the moment only NP postcodes.

thanks

http://www.list-logic.co.uk/no-index/order/newport-postcode-address-list.html
try these people if no luck i might have other options for you.

For the life of me, I can’t get the Post Code query working. I have set it all up according to the tutorial, I have re-installed SambaPOS 4.1.82 running Windows 7 Pro. I tried everything I could find suggested and variations of such. I wonder if the file is actually being accessed. Don’t know. Here are images of setup and file. Any help would be greatly appreciated.

Thanks in advance

You can’t put it in a users folder it will not have permission

Please review tutorial carefully for file name entry. It is not part of editing format. It should go under values.

1 Like

OMG! I totally missed that. Thank you so much. I would have looked passed that over and over again. I kept refering to the image and I never noticed. It now works

Big thank you Emre and kendash

Am usually good in excel but cannot remember how to do it.
Have a sample postcode list file but csv is only comma split, how can i quickly add the " "?

Also has anyone worked out how to handle multiple addresses in a postcode?
@emre if this was something you were looking to add functionality for I had a thought how it might be implemented…
If there could be a ‘drop down’ option for an entity which could be populated with the query result of a ‘Postcode Search’ field which then when selected this propagated the other address fields with the values from that search result.

ALSO, anyone in the UK might be interested in;
https://alpha.openaddressesuk.org/
Its a free address list - however is not totally complete but there is just over 1 million addresses, have filtered to unique postcodes which leaves about 400k.
Either way if your in the UK take 30 seconds to add your address. :smile:
ukpostcodelist.zip (3.1 MB)
Here is street level .txt file for UK from their site formatted ready for Samba as Postcode=$1;Street=$3;Town=$2

Here is one I have converted to ‘Proper Case’
ukpostcodelist (2).zip (3.1 MB)

3 Likes