5 Replies Latest reply on Jun 19, 2014 8:48 AM by philmodjunk

    Multiple Currency Conversion

    TeddyBear

      Title

      Multiple Currency Conversion

      Post

           I have three fields: A, B, C.
             
      •           Field A contains date of payment.
      •      
      •           Field B is amount of selected currency.
      •      
      •           Field C is a drop-down associated with the selected currency.
            
           Is there a way that l can include a script that will take my selected currency in Field A and the value in B and apply a currency conversion that would be displayed in new fields
            
           The goal is to input a $/€/£ value and see not only the base currency but also the conversion into $ whats rate will be input manual daily.  In attached screenshot, all fields from right, must be converted in USD.
            
            
           PS! i takes a look at Multiple Currency Conversion
           but don't understand how to do it using  PhilModJunk's example.
            
            
           Any advise would be appreciated and thanks in advance
            
            
            
           Ted

        • 1. Re: Multiple Currency Conversion
          philmodjunk

               That thread seems a very good match to your problem. Field A in your post would be the "Currency_Type" field in my example.

               Let's see if we can clear up the "how to part". What part of that post don't you understand?

          • 2. Re: Multiple Currency Conversion
            TeddyBear

                 Hi PhilModJunk, i don't understand nothing((( but something is missing. Can you rewrited it step by step?

                  

                 1.  I makes table named "CurrencyValues" containing 2 values: CurrType (text) and ConvFactor (Number)

                 2. This i dont understand at all: Put a matching field for CurrType in your main table and make this your drop down menu.

            i makes new dropdown value list, and added currency types "dollar euros and lirs" named Currency.

            3. i Makes a relationship between your main table and CurrencyValues:

                 CurrencyValues::CurrType--=--MainTable::CurrType

                 4. This i also don't understand at all, where to put UnconvertedCurrency?

                 Define a conversion calculation and use it as either an auto-entered number or a calculated field

                 Maintable::UnconvertedCurrency * CurrencyValues::ConvFactor

                  

                  

                 Ok, because i don't have any success understanding your examples, i tried something else.

                 1. I makes new table named Prepayments with 6 values:

                 k_ID_LineItem (Number) Auto-enter Serial

                 kb_ID_PO (Number) Indexed   (to see the list of all prepayments)

                 Amount (Number) 

                 Created (Date) Creation Date, Can't Modify

                 Currency (Text) And linked to dropdown with currencies (Dollar, Euro, Lirs)

                 ConvCurr (Number) Auto-enter calculation replace existing value, can't modify. and makes formula:

                 If ( Prepayment_Currency = "Euro" ; ConvCurr = Prepayment_Amount * 1.36 ;

                 If ( Prepayment_Currency = "Lirs" ; ConvCurr = Prepayment_Amount * 1.7 ;

                 If ( Prepayment_Currency = "Dollar" ; ConvCurr = Prepayment_Amount * 1 ;

                 ConvCurr = Prepayment_Amount * 99 ) ) )

                 first 2 convert currency in Dollar, last one in case of error multiply it by 99 to see error.

                 It work perfect.

                  

                 Now i have to make a new table, where i will can add exchange values daily what will be used "1.36" "1.7"

            • 3. Re: Multiple Currency Conversion
              philmodjunk

                   2) I mistyped my last response. From your original post, you already have this field, the field you called "field C".

                   

                        Field C is a drop-down associated with the selected currency.

                   So you shouldn't need to add a new field as you already have it.

                   the Define your relationship:

                   YourTable::FieldC = CurrencyValues::CurrType

                   Just make sure that the values in CurrType are exactly the same as those in your value list for FieldC

                   4) you need a number field where you enter the unconverted currency and a calculation field that uses the conversion value from the related table to compute the converted value. You enter the value in 1 field and see the converted value in the other.

              • 4. Re: Multiple Currency Conversion
                TeddyBear

                     Thank you Phil, can you please write it step by step? because for me this is still unclear.

                     And for everybody else, who'll search this question, will be more easy.

                • 5. Re: Multiple Currency Conversion
                  philmodjunk

                       But the other link already spells this out step by step....