Alpha Video Training
Results 1 to 12 of 12

Thread: countries of the world

  1. #1
    Member
    Real Name
    Ian Edwards
    Join Date
    Jul 2004
    Posts
    349

    Default countries of the world

    From our web authorship we have a list in excell of all the countries of the world.

    What Id like to do is on a form have a drop down simple list showing the countries.

    Using the field rules I can of course set up a simple list but to type in all the countries would be ......

    An easy way anyone?

    thanks

    Ian

  2. #2
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default RE: countries of the world

    create a table that has the data.
    then use a table lookup field rule.

    an easy way to create a table with the data is to use the 'new table by example' command (go to tables tab on the control panel and click the new button).

    if you have the list of countries on the clipboard, then just paste the data in here, and a5 will create a table with all of the data.

    assuming you have the data on the clipboard, it should take you all of 10 seconds.

  3. #3
    Claudio Pilustrelli
    Guest

    Default RE: countries of the world

    Ian
    If you still need the country list of the world let me know I can mail it to you in an simple alphafive format.
    clipi@ya.com
    Claudio

  4. #4
    Member
    Real Name
    Ian Edwards
    Join Date
    Jul 2004
    Posts
    349

    Default RE: countries of the world

    Hi

    Thanks but I have a country list that I use on web sites. I've managed to import it into a form and setup the choice field.

    Only thingI'm having trouble with is setting a default country

    any ideas

    Cheers

    Ian

  5. #5
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default RE: countries of the world

    Hi Ian,

    In the field that you are using for the countries, go to the field rules, data entry tab, simple default expression, "United States" (is what I have in mine for the default value)

    I have attached the table I created for countries in case you or anybody else would like it.

    Cheryl

  6. #6
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default RE: countries of the world

    cheryl

    would you mind if i used the data you posted to create a new a5 function called countries_list()?

  7. #7
    VAR
    Real Name
    Cheryl Lemire
    Join Date
    Jul 2003
    Location
    Pembroke Pines, FL
    Posts
    2,914

    Default RE: countries of the world

    Not at all Selwyn, help yourself. I am attaching my states table if you would like that one as well.

  8. #8
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default RE: countries of the world

    ok, great. thanks. i just added this for the next release:

    ?countriesOfWorld("code - name")
    = 001 - United States
    002 - Afghanistan
    003 - Albania

    ?countriesOfWorld("name")
    = United States
    Afghanistan


    ?countryLookup("angola")
    = "006"

    ?countryLookup("002")
    = "Afghanistan"

  9. #9
    Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,596

    Default RE: countries of the world

    Now you have to keep up with world events as countries are created and destroyed!

  10. #10
    Member
    Real Name
    Trevor Sayers
    Join Date
    Jan 2004
    Posts
    118

    Default RE: countries of the world

    Hi folks,

    along similar lines, I created a couple of functions a while ago to strip prefixes and suffixes from names. Help yourselves if they're any use. Selwyn, feel free to include them in the app if you like them or want to modify them.

    The functions output both the prefix/suffix as it should be as well as the version the function has trapped so you can peel away at both ends of your input text to get to the underlying name. The lists are not exhaustive. Perhaps some of our foreign friends can create lists for their respective countries? Ah the joy of collaboration!

    Regards,
    Trevor


    Example:
    dim a as c
    dim b as c
    a = "Rt Hon Selwyn Rabins MP"

    findprefix(a,.t.) sets
    actualPrefixC to " Rt. Hon."
    unmodPrefixC to " Rt Hon"

    findsuffix(a,.t.) sets
    actualSuffixC to " M.P."
    unmodSuffixC to " MP"

    then use
    b=substr(a,len(actualPrefixC),len(a)-len(actualPrefixC)-len(actualSuffixC))
    ...to set b to "Selwyn Rabins"
    END

  11. #11
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,279

    Default RE: countries of the world

    thanks very much

  12. #12
    Member
    Real Name
    Ian Edwards
    Join Date
    Jul 2004
    Posts
    349

    Default RE: countries of the world

    What can I say

    thanks a lot

    Ian

Similar Threads

  1. Real World App
    By Rayr in forum Web Application Server v6
    Replies: 6
    Last Post: 10-14-2005, 12:25 AM
  2. V6 in PC World
    By John Oesterle in forum Announcements
    Replies: 1
    Last Post: 07-20-2004, 08:21 AM
  3. PC World covers Report Mailer
    By Richard Rabins in forum Announcements
    Replies: 0
    Last Post: 12-30-2002, 10:46 PM
  4. Life in the world of giant forms
    By Greg Fong in forum Alpha Five Version 4
    Replies: 4
    Last Post: 11-28-2001, 04:10 PM
  5. Exporting to UPS (World Ship)
    By Daniel Weiss in forum Alpha Five Version 4
    Replies: 4
    Last Post: 03-30-2001, 07:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •