logo

NJP

Currency field on the record producer

Import · Oct 07, 2023 · article

Recently, I came across a question where the questioner asked about adding a currency field on the record producer.

I had a similar use case in the past where I needed to show an amount field with currency sign attached to it on a record producer.

After exploring the variable types available for the catalog items, I reached to a conclusion that most of them were not a direct fit for showing currency data.

The only option left was to check on the widget side, and here I stumbled up on an OOTB widget Variable Currency which actually does the same job.

Screenshot 2023-10-07 at 9.28.20 AM.png

This widget shows the currency sign (based on the logged in users locale) along with the single line text field to capture the amount.

Screenshot 2023-10-07 at 9.33.24 AM.png

It also has a validation in place which lets use enter number only.

Screenshot 2023-10-07 at 9.36.13 AM.png

Following are the steps I used to configure the this widget on my Record Producer.

1. On your record producer, Variable should be of type Custom with Label. In Widget select Variable CurrencyScreenshot 2023-10-05 at 3.53.45 PM.png

The end result looks like following.

Screenshot 2023-10-05 at 3.56.07 PM.png

The currency is shown according to user locale. It shows symbols for $ and Euro.

Hope this helps.

View original source

https://www.servicenow.com/community/service-portal-articles/currency-field-on-the-record-producer/ta-p/2694769