Skip to main content
Participant
January 29, 2024
Question

Multiple currency symbols

  • January 29, 2024
  • 1 reply
  • 828 views

Hi,

 

I have a column on a document that autosums all the numbers in it in the bottom cell (image attached).

Sometimes this form is filled out for figures in pounds sterling(£) and sometimes in Euro(€).

 

Is it possible to have whatever currency symbol I enter in the rows appear in the autosum total at the end. For example if I start entering amounts with a £, the autosum cell will have a £ and vice versa for €.

 

Note: The rows never deal with mixed currency, it is always either one or the other.

 

Thanks

 

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
January 29, 2024

The fields are not formatted to currency?

Wouldn't be easier to have a checkbox to switch between currency or even better two radio buttons?

gk_IRLAuthor
Participant
January 29, 2024

Thanks. Check boxes or a dropdown would work as a placholder for now but ideally it would just take whatever currency sybol the user entered in the cell and copy it down to the autosum cell

Nesa Nurani
Community Expert
Community Expert
January 29, 2024

There is a lot of info missing from your post, but I assume you manually enter the currency sign and that it's on the left of the value, also if the first field in the column would always be populated it would be enough to check only that field for sign.

Let's say that field name is "Text1", you would use something like this as custom format script of total field:

var text1 = this.getField("Text1").valueAsString;
var cur = text1.charAt(0);
event.value = util.printf(cur+" %,0.2f",event.value);

This is just a basic script, it can be updated to check if the first character is actually a currency sign...etc