Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to implement currency conversion in order to convert any of the currencies proposed (Norwegian Krone (NOK), Euro, USD or Pound (GBP), by the date (currencies rates base in monthly values) the values available in a table.
I have a currency rate table, with all the corresponding values for the currencies, where I have a field with the concatenated values: ‘From-To-Year-Month’ that is called exchkey. I have tried to use the functions FieldValue and FieldIndex to get the corresponding Rate value from the table. At the beginning it seems to work ok, but I have realized it don’t return the correct rate value, only works for the first value in the table:
Doc. Number | Net Value | Rate | Net value coverted | Value 'exchkey' |
4400033474 | Kr 210000,00 | 0,078439 | € 16472,19 | NOK-EUR-2014-1 |
4400033481 | € 320000,00 | 1 | € 320000,00 | EUR-EUR-2014-1 |
4400033485 | $ 20880,00 | 8,838021 | € 184537,88 | USD-EUR-2014-1 |
4400033502 | Kr 1361840,00 | 0,078439 | € 106821,37 | NOK-EUR-2014-1 |
Exch. key | ExRt | From | To | Curr Date | Exch. Rate | Curr year | Curr month |
EUR-EUR-2014-1 | XRATE | EUR | EUR | 20140101 | 1 | 2014 | 1 |
NOK-EUR-2014-1 | XRATE | NOK | EUR | 20140101 | 0.119213 | 2014 | 1 |
NOK-GBP-2016-1 | XRATE | NOK | GBP | 20160101 | 0.078439 | 2016 | 1 |
USD-EUR-2014-1 | XRATE | USD | EUR | 20140101 | 0.734198 | 2014 | 1 |
USD-NOK-2016-1 | XRATE | USD | NOK | 20160101 | 8.838021 | 2016 | 1 |
Could you help me with this case?. I would like to know if there are a mistake in the way I’m using FirldValue formula, or if the currency conversion should be done in the script side and not during the expressions calculation?.
Attached is the example of the application I have used.
Thanks in advance.
Please do not double-posting: How to use FieldValue() for Currency Convertion