3 Replies Latest reply on Dec 23, 2014 7:25 AM by philmodjunk

    Currency exchange question

    ultranix

      Title

      Currency exchange question

      Post

      Hey, for 3 years I've been running my personal finances database. Currency in our country is and for next 10 days will be Litas (LTL). At the start of the next year (2015), our country will have a new currency - euro (EUR), so very first operation would be to transfer funds from various accounts of Litas currency to new accounts of euro currency.

      How to do this easily?

      And also I want to be able to retain my previous records in Litas (and therefore to have euro equivalent next to the sum in Litas)

        • 1. Re: Currency exchange question
          philmodjunk

          So you are from Lithuania? (Your English is excellent)

          You could save a copy of your previous file or just the previous records to keep the data in it's original form.

          There are a number of ways that you could apply a conversion factor to your values to convert (a copy of) them into Euros by entering the conversion factor (the value of 1 Euro in Litas) and then Replace Field Contents or a looping script can update them all in one batch operation.

          • 2. Re: Currency exchange question
            ultranix

            Thank you for your comment :)

            I would like to get deeper into that and apply the scheme I've seen in smartphone app. You set your "base currency", which is your country's currency (in main table, Accounts) and then set ratio. If you add another account in your country's currency, ratio is 1. If you account with different currency, you add different ratio. And then you set up calculations. But there should be 2-way ratio's, e.g. in LTL-EUR pair one ratio is for EUR-to-LTL and another for LTL-to-EUR. So you could easily track your spending habits even being on vacation abroad.

            • 3. Re: Currency exchange question
              philmodjunk

              Yes, how is your table designed and do you want all values to automatically convert when you update the exchange rate?

              Note that if you have X Lita/Euro as your exchange rate  Lita/Rate gives you Euros and Euros * Rate gives you Lita so the same value can convert values in each direction. You can certainly enter the rate into a global field, store all your values as either Lita or Euros (or any other currency you choose to work with as the math is the same, but with different conversion factors) and an unstored calculation can display the equivalent value in the other currency. You can set up something like a global field (perhaps in a popover) so that if you are storing Lita, but calculating Euros, you can enter a value in Euros into the global field and a script can convert to Lita and store the value in the Lita field.

              Just be careful how/if you round values here as a bit of round off error can keep the system from always computing the calculated Euro value identical to a Euro value you first entered.