Sandeep Rajput
Tera Patron
Tera Patron

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.

 

Comments
Kirandeep Kaur
Tera Contributor

Unit of currency is non editable. Can we make it editable?

 

Regards,

Kirandeep Kaur

Sandeep Rajput
Tera Patron
Tera Patron

@Kirandeep Kaur The OOTB widget picks currency based on current user's locale. Additional implementation would be needed to make currency field show additional currencies. 

David Speirs
Tera Contributor

Are there any solutions similar to this that would work within a Multi-Row Variable set?

Community Alums
Not applicable

Is there a way to make the currency widget as read-only? I tried catalog dictionary, catalog ui policy, catalog client script, it does not work.

doyin
Tera Expert

What if we want just a static currency, e.g $?

Version history
Last update:
‎10-06-2023 09:10 PM
Updated by:
Contributors