Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Currency Conversion Function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Al Buchholz
    replied
    Re: Currency Conversion Function

    Ton

    You should load the function and the run it from the interactive window. The function doesn't need an argument, the drop downs will let you choose your options.

    Here is a slightly easier way to set up this function in your database.

    Attached is an export of the function from my database. Save this file on your computer. In your database, go to the control panel, code tab, right click import and select the file. Follow the import process.


    Edit: I've attached an image of what you should see when you run the function.

    Leave a comment:


  • Ton Spies
    replied
    Re: Currency Conversion Function

    James,

    I think I miss something.
    As I don't see any parameter I don't know how to get the wanted results.

    Ton

    Leave a comment:


  • Mr GreenJeans
    started a topic Currency Conversion Function

    Currency Conversion Function

    Here is a quick simple function that looks up the exchange rate for two currencies and returns the values.

    Enjoy...keep the ideas flowing :-)

    Code:
    'Date Created: 28-Jan-2008 04:02:17 AM
    'Last Updated: 28-Jan-2008 04:02:17 AM
    'Created By  : Mr. GreenJeans
    'Updated By  : Mr. GreenJeans
    FUNCTION curr_con AS a ( )
        
        'Create an XDialog dialog box to prompt for parameters.
    DIM SHARED From as C
    DIM SHARED to as C
    DIM SHARED Amount as N
    DIM SHARED varC_result as C
    Amount = 0.00
    DELETE a_From        
    DIM a_From[151] as c
    dim temp_list as c 
    temp_list = <<%list%
    AFA-Afghanistan Afghani
    ALL-Albanian Lek
    DZD-Algerian Dinar
    ARS-Argentine Peso
    AWG-Aruba Florin
    AUD-Australian Dollar
    BSD-Bahamian Dollar
    BHD-Bahraini Dinar
    BDT-Bangladesh Taka
    BBD-Barbados Dollar
    BZD-Belize Dollar
    BMD-Bermuda Dollar
    BTN-Bhutan Ngultrum
    BOB-Bolivian Boliviano
    BWP-Botswana Pula
    BRL-Brazilian Real
    GBP-British Pound
    BND-Brunei Dollar
    BIF-Burundi Franc
    XOF-CFA Franc (BCEAO)
    XAF-CFA Franc (BEAC)
    KHR-Cambodia Riel
    CAD-Canadian Dollar
    CVE-Cape Verde Escudo
    KYD-Cayman Islands Dollar
    CLP-Chilean Peso
    CNY-Chinese Yuan
    COP-Colombian Peso
    KMF-Comoros Franc
    CRC-Costa Rica Colon
    HRK-Croatian Kuna
    CUP-Cuban Peso
    CYP-Cyprus Pound
    CZK-Czech Koruna
    DKK-Danish Krone
    DJF-Dijibouti Franc
    DOP-Dominican Peso
    XCD-East Caribbean Dollar
    EGP-Egyptian Pound
    SVC-El Salvador Colon
    EEK-Estonian Kroon
    ETB-Ethiopian Birr
    EUR-Euro
    FKP-Falkland Islands Pound
    GMD-Gambian Dalasi
    GHC-Ghanian Cedi
    GIP-Gibraltar Pound
    XAU-Gold Ounces
    GTQ-Guatemala Quetzal
    GNF-Guinea Franc
    GYD-Guyana Dollar
    HTG-Haiti Gourde
    HNL-Honduras Lempira
    HKD-Hong Kong Dollar
    HUF-Hungarian Forint
    ISK-Iceland Krona
    INR-Indian Rupee
    IDR-Indonesian Rupiah
    IQD-Iraqi Dinar
    ILS-Israeli Shekel
    JMD-Jamaican Dollar
    JPY-Japanese Yen
    JOD-Jordanian Dinar
    KZT-Kazakhstan Tenge
    KES-Kenyan Shilling
    KRW-Korean Won
    KWD-Kuwaiti Dinar
    LAK-Lao Kip
    LVL-Latvian Lat
    LBP-Lebanese Pound
    LSL-Lesotho Loti
    LRD-Liberian Dollar
    LYD-Libyan Dinar
    LTL-Lithuanian Lita
    MOP-Macau Pataca
    MKD-Macedonian Denar
    MGF-Malagasy Franc
    MWK-Malawi Kwacha
    MYR-Malaysian Ringgit
    MVR-Maldives Rufiyaa
    MTL-Maltese Lira
    MRO-Mauritania Ougulya
    MUR-Mauritius Rupee
    MXN-Mexican Peso
    MDL-Moldovan Leu
    MNT-Mongolian Tugrik
    MAD-Moroccan Dirham
    MZM-Mozambique Metical
    MMK-Myanmar Kyat
    NAD-Namibian Dollar
    NPR-Nepalese Rupee
    ANG-Neth Antilles Guilder
    NZD-New Zealand Dollar
    NIO-Nicaragua Cordoba
    NGN-Nigerian Naira
    KPW-North Korean Won
    NOK-Norwegian Krone
    OMR-Omani Rial
    XPF-Pacific Franc
    PKR-Pakistani Rupee
    XPD-Palladium Ounces
    PAB-Panama Balboa
    PGK-Papua New Guinea Kina
    PYG-Paraguayan Guarani
    PEN-Peruvian Nuevo Sol
    PHP-Philippine Peso
    XPT-Platinum Ounces
    PLN-Polish Zloty
    QAR-Qatar Rial
    ROL-Romanian Leu
    RUB-Russian Rouble
    WST-Samoa Tala
    STD-Sao Tome Dobra
    SAR-Saudi Arabian Riyal
    SCR-Seychelles Rupee
    SLL-Sierra Leone Leone
    XAG-Silver Ounces
    SGD-Singapore Dollar
    SKK-Slovak Koruna
    SIT-Slovenian Tolar
    SBD-Solomon Islands Dollar
    SOS-Somali Shilling
    ZAR-South African Rand
    LKR-Sri Lanka Rupee
    SHP-St Helena Pound
    SDD-Sudanese Dinar
    SRG-Surinam Guilder
    SZL-Swaziland Lilageni
    SEK-Swedish Krona
    TRY-Turkey Lira
    CHF-Swiss Franc
    SYP-Syrian Pound
    TWD-Taiwan Dollar
    TZS-Tanzanian Shilling
    THB-Thai Baht
    TOP-Tonga Pa'anga
    TTD-Trinidad&amp;Tobago Dollar
    TND-Tunisian Dinar
    TRL-Turkish Lira
    USD-U.S. Dollar
    AED-UAE Dirham
    UGX-Ugandan Shilling
    UAH-Ukraine Hryvnia
    UYU-Uruguayan New Peso
    VUV-Vanuatu Vatu
    VEB-Venezuelan Bolivar
    VND-Vietnam Dong
    YER-Yemen Riyal
    YUM-Yugoslav Dinar
    ZMK-Zambian Kwacha
    ZWD-Zimbabwe Dollar
    %list%
    
    a_From.initialize(temp_list)
    
    DELETE a_to        
    DIM a_to[151] as c
    dim temp_list as c 
    temp_list = <<%list%
    AFA-Afghanistan Afghani
    ALL-Albanian Lek
    DZD-Algerian Dinar
    ARS-Argentine Peso
    AWG-Aruba Florin
    AUD-Australian Dollar
    BSD-Bahamian Dollar
    BHD-Bahraini Dinar
    BDT-Bangladesh Taka
    BBD-Barbados Dollar
    BZD-Belize Dollar
    BMD-Bermuda Dollar
    BTN-Bhutan Ngultrum
    BOB-Bolivian Boliviano
    BWP-Botswana Pula
    BRL-Brazilian Real
    GBP-British Pound
    BND-Brunei Dollar
    BIF-Burundi Franc
    XOF-CFA Franc (BCEAO)
    XAF-CFA Franc (BEAC)
    KHR-Cambodia Riel
    CAD-Canadian Dollar
    CVE-Cape Verde Escudo
    KYD-Cayman Islands Dollar
    CLP-Chilean Peso
    CNY-Chinese Yuan
    COP-Colombian Peso
    KMF-Comoros Franc
    CRC-Costa Rica Colon
    HRK-Croatian Kuna
    CUP-Cuban Peso
    CYP-Cyprus Pound
    CZK-Czech Koruna
    DKK-Danish Krone
    DJF-Dijibouti Franc
    DOP-Dominican Peso
    XCD-East Caribbean Dollar
    EGP-Egyptian Pound
    SVC-El Salvador Colon
    EEK-Estonian Kroon
    ETB-Ethiopian Birr
    EUR-Euro
    FKP-Falkland Islands Pound
    GMD-Gambian Dalasi
    GHC-Ghanian Cedi
    GIP-Gibraltar Pound
    XAU-Gold Ounces
    GTQ-Guatemala Quetzal
    GNF-Guinea Franc
    GYD-Guyana Dollar
    HTG-Haiti Gourde
    HNL-Honduras Lempira
    HKD-Hong Kong Dollar
    HUF-Hungarian Forint
    ISK-Iceland Krona
    INR-Indian Rupee
    IDR-Indonesian Rupiah
    IQD-Iraqi Dinar
    ILS-Israeli Shekel
    JMD-Jamaican Dollar
    JPY-Japanese Yen
    JOD-Jordanian Dinar
    KZT-Kazakhstan Tenge
    KES-Kenyan Shilling
    KRW-Korean Won
    KWD-Kuwaiti Dinar
    LAK-Lao Kip
    LVL-Latvian Lat
    LBP-Lebanese Pound
    LSL-Lesotho Loti
    LRD-Liberian Dollar
    LYD-Libyan Dinar
    LTL-Lithuanian Lita
    MOP-Macau Pataca
    MKD-Macedonian Denar
    MGF-Malagasy Franc
    MWK-Malawi Kwacha
    MYR-Malaysian Ringgit
    MVR-Maldives Rufiyaa
    MTL-Maltese Lira
    MRO-Mauritania Ougulya
    MUR-Mauritius Rupee
    MXN-Mexican Peso
    MDL-Moldovan Leu
    MNT-Mongolian Tugrik
    MAD-Moroccan Dirham
    MZM-Mozambique Metical
    MMK-Myanmar Kyat
    NAD-Namibian Dollar
    NPR-Nepalese Rupee
    ANG-Neth Antilles Guilder
    NZD-New Zealand Dollar
    NIO-Nicaragua Cordoba
    NGN-Nigerian Naira
    KPW-North Korean Won
    NOK-Norwegian Krone
    OMR-Omani Rial
    XPF-Pacific Franc
    PKR-Pakistani Rupee
    XPD-Palladium Ounces
    PAB-Panama Balboa
    PGK-Papua New Guinea Kina
    PYG-Paraguayan Guarani
    PEN-Peruvian Nuevo Sol
    PHP-Philippine Peso
    XPT-Platinum Ounces
    PLN-Polish Zloty
    QAR-Qatar Rial
    ROL-Romanian Leu
    RUB-Russian Rouble
    WST-Samoa Tala
    STD-Sao Tome Dobra
    SAR-Saudi Arabian Riyal
    SCR-Seychelles Rupee
    SLL-Sierra Leone Leone
    XAG-Silver Ounces
    SGD-Singapore Dollar
    SKK-Slovak Koruna
    SIT-Slovenian Tolar
    SBD-Solomon Islands Dollar
    SOS-Somali Shilling
    ZAR-South African Rand
    LKR-Sri Lanka Rupee
    SHP-St Helena Pound
    SDD-Sudanese Dinar
    SRG-Surinam Guilder
    SZL-Swaziland Lilageni
    SEK-Swedish Krona
    TRY-Turkey Lira
    CHF-Swiss Franc
    SYP-Syrian Pound
    TWD-Taiwan Dollar
    TZS-Tanzanian Shilling
    THB-Thai Baht
    TOP-Tonga Pa'anga
    TTD-Trinidad&amp;Tobago Dollar
    TND-Tunisian Dinar
    TRL-Turkish Lira
    USD-U.S. Dollar
    AED-UAE Dirham
    UGX-Ugandan Shilling
    UAH-Ukraine Hryvnia
    UYU-Uruguayan New Peso
    VUV-Vanuatu Vatu
    VEB-Venezuelan Bolivar
    VND-Vietnam Dong
    YER-Yemen Riyal
    YUM-Yugoslav Dinar
    ZMK-Zambian Kwacha
    ZWD-Zimbabwe Dollar
    %list%
    
    a_to.initialize(temp_list)
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("Currency Conversion",<<%dlg%
    {region}
    {Region}
    ;
    {Endregion};
    {Region}
    Covert:| [.40,5From^#a_From]| To:| [.40,5to^#a_to];
    Amount:| [%z%.10Amount];
    {Endregion}; 
    {Region}
    ;
    {Endregion};
    {line=1,0};
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>;
    {endregion};
    %dlg%)
    delete x
    delete p
    f = word(from,1,"-")
    t = word(to,1,"-")
    x = http_get("http://www.webservicex.net/CurrencyConvertor.asmx/ConversionRate?FromCurrency="+f+"&ToCurrency="+t)
    result = extract_string(x.body,"<double xmlns=\"http://www.webserviceX.NET/\">","</double>")
    
    r = amount*convert_type(result,"n")
    p.from = From
    p.to = to
    p.amount = Amount
    p.result = r
    
    curr_con = p
    END FUNCTION
Working...
X