fbugeja Posted May 7, 2013 Posted May 7, 2013 In Australia, every city has a 4-digit postcode (zipcode) as part of its address. For example Canberra, our capital city, has a postcode of 2600. I am creating a database of disability organisations. The aim of the database is to allow users to enter the postcode of the suburb they live in and the database will find all disability organisations within a +10 and -10 range of the entered postcode. If the user entered 2112 as their postcode, the database should be able to find disability organisations within the postcode range 2102 and 2122. There will be a field called "Postcode" in the database which displays the postcode of the disability organisation. I need to keep it simple for users. My idea: they first click a button called "Postcode Search" (which contains the script). A dialog box with the text "Enter your postcode:" then appears. Users enter their postcode, click Enter, then a message "Sorry - no disability organisations found" or " disability organisation(s) found" appears. if no organisations are found, the search should then end. If the latter message appears, users are then able to go through the found records (disability organisations within the postcode range). The script obviously would need to be able to search the Postcode field to see if it is within the required range and then "pull it out" for preview by the user. Assistance for a script which does the above would be appreciated! Frank
jbante Posted May 7, 2013 Posted May 7, 2013 What have you tried so far? Blind experimentation is an important part of programming (even long after you get good at it), and many folks on the forum are reluctant to invest effort in answering questions when it isn't clear that the original poster has already exhausted their own ideas. Seeing what you've already tried can also inform better feedback. For the ranged-find subset of what you're trying to do, try something like this, and let us know how it works out: Enter Find Mode [] Set Variable [$lowBound; Value:$postcode - 10] Set Variable [$highBound; Value:$postcode + 10 ] Set Field [Table::postcode; Value: $lowBound & "..." & $highBound] Perform Find[]
webko Posted May 8, 2013 Posted May 8, 2013 You should also note that this a very rough guide of what may be nearby - and that a lot of organisations are now on the Mail Centre postcodes, that are not anything like the suburb they are actually in. Eg, an organisation in Surry Hills (2010) may well have its postcode listed as 1235 (Sydney South PO Boxes) 1
Recommended Posts
This topic is 4217 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now