Truncate a number in a template

  • 1
  • Question
  • Updated 3 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 3 years ago

  • 1
Photo of Shmuel Kamensky

Shmuel Kamensky, Champion

  • 4,700 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