Truncate a number in a template

  • 1
  • Question
  • Updated 2 years ago
I have a template that has a field from an aggregate model in it (as well as some additional text).  How can I limit the number to 2 digits after the decimal?
Photo of Curtis Ellingham

Curtis Ellingham

  • 362 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,328 Points 4k badge 2x thumb
Skuid UI only formulas field don't have a MID function. So, if you don't know precisely how many digits the number will be, you can't use a UI only formula field. Your options would be a snippet (custom field renderer probably), or a Salesforce formula which you could then include in your model and template.

If you do know how many digits your number will be, you could use the LEFT function in a skuid ui only formula field http://help.skuid.com/m/models-conditions-filters/l/378313-ui-only-fields
(Edited)