Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to easily convert from FX Currency using Exchange Rates

PavelP
Mega Sage

Hello,

we are running a Single-Currency mode on an instance but recently got a requirement to track different currencies on a specific field, and be able to convert the currency to a different field. I found that the 'FX Currency' Field would allow us to do it fairly well.

My expectation was that we'd have a script, that will convert the value from the field upon entering it. However, while I'm able to enter any currency I need, I haven't found a simple way to convert the value into a different field.

My plan was to use the Exchange Rates table ('fx_rate') and hoped there is an existing function I could use, but I haven't been able to find one.

Is there a function or similar functionality for conversion of the FX Currency field into another available, or is there a different best practice to achieve what we are trying? 

Thanks for the advice

Best regards

Pavel

1 ACCEPTED SOLUTION

Hi,

meant it a bit differently - that I want to have the value entered in the FX Field manually, and converted it to different field.

I'll likely end up using the GlideCurrencyConverte.

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_currency-namespace/GlideCurrencyExchangeValueScopedAPI

View solution in original post

3 REPLIES 3

Allen Andreas
Tera Patron

Hi,

The field would do the conversion itself, if following guidance like this documentation: https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/currency/task/fx-cur...

If it's for one specific other currency, whatever the value is that is input, it'll auto-convert to that referenced currency.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

meant it a bit differently - that I want to have the value entered in the FX Field manually, and converted it to different field.

I'll likely end up using the GlideCurrencyConverte.

https://developer.servicenow.com/dev.do#!/reference/api/sandiego/server/sn_currency-namespace/GlideCurrencyExchangeValueScopedAPI

Hello,

Alright. Your messaging was a bit confusing and it appears you've now answered your own question with what you'll likely...end up using.

Take care!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!