Automatic currency conversion


I have a master table that includes financial information for each of my records.

Every time I create a new record or update an existing one in my master table, I would like to automatically get that amount converted in CHF and added to a separate table. It would be even better if the conversion could be periodically updated automatically to the latest conversion rate. The conversion rate used should be InforEuro.

It“s also worth noting that we operate in different currencies (CHF, USD, GBP, EUR), so the automation should be able to distinguish from one of our four currencies in order to pick the correct coversion rate (the currency used is always indicated in the record).

Is this doable? Is there anyone else that is doing something similar and could guide me? Many thanks in advance.

1 reply

    • Admin.7
    • 1 yr ago
    • Reported - view

    Hey, old topic but i got solution ( and issue ) I am using the following code to convert currency, it works well with all currentcy but no USD. 

    do as server
        let url := "http://api.currencylayer.com/live?access_key=xxxxxxxxxxxxxxxxxxxxxxxxxxx";
        url := url + "&currencies=" + "EUR" + "," + "CNY";
        let response := http("GET", url);
        let quotesStr := formatJSON(response.result.quotes);
        let fromConverter := item(split(item(split(quotesStr, "USD" + "EUR" + """:"), 1), ","), 0);
        let toConverter := item(split(item(split(quotesStr, "USD" + "CNY" + """:"), 1), "}"), 0);
        'Spending RMB' := 'Spending €' * number(toConverter) / number(fromConverter)

    this work well, if you have any idea how to do for USD I would be greatfull

Content aside

  • 1 yr agoLast active
  • 1Replies
  • 353Views
  • 1 Following