Yes, this is what I meant by “I can get what I want to do in another way but…”, I was just seeing if I was missing something with the formatting style.
On my UK system, Number.format("$") gives me a string with the the number rounded to 2 decimal places, formatted with thousands separator as per my locale and with a ‘£’ prefix.
Thus 4525.3456 becomes £4,525.35.
I guess you need to swap locale(), but I’m not that sure if currency formatting is really intended to work for any currency.
Yes, I’m looking to specify local for a note, but from the documentation, it is not clear to me how to do this. How would you use local() in the action code? it does not appear to be a .operator.
I tried chaining .format() calls but it didn’t work So, we first make a two-DP number variable, then use locale-dependent styling. We could as easily add USD instead:
But if you want Euros in German delimiters, i.e. €4.525,35 not English-style €4,525.35 then you would need to change active locale as .format("l") is locale dependent for things like thousands separators and decimal separator. Also bear in mind, locale is accessing the users localisation settings for the given locale so if the user has for any reason further customised their per-locale setting, results may vary. But, that’s the whole point on different locale. Diversity FTW!
Bottom line, I don’t think there is an answer as simple as you were hoping for.