I’m trying to get a number field to display as currency, but with a custom number of places after the decimal. Essentially trying to trim the trailing zeroes for display purposes. Here’s my code but it doesn’t work. The field is defined with 8 decimals and it always displays with 8 decimals regardless of the actual value:
var field = argumentsu0]; var value = argumentsu1]; field.element.css({'text-align': 'right'}); if (value == null || value == 0) { skuid.ui.fieldRenderers.CURRENCYRfield.mode](field,value); } else { value = value.toString(); var valLen = value.length; var displayValue = (Number(value).toFixed(valLen-2)); skuid.ui.fieldRenderers.CURRENCYRfield.mode](field,displayValue); }