AnsweredAssumed Answered

Rounding an integer to the nearest 100 or 1000

Question asked by Arjun Naskar on Dec 5, 2018
Latest reply on Jan 3, 2019 by Arjun Naskar

We have an attribute that represents the number of messages a particular user has sent. Because it seems weird to list the exact number, we want to round this to the closest hundred value. I assume velocity is the way to go and came up with the following but it failed to populate (just remained blank in the sample email send with a confirmed non null value)

 

#set ($rounded_number = $math.roundTo(2, ${lead.Message_Volume__c_contact}))

 

Additionally, over tens of thousands of messages, it would be helpful to have the usual (US format) commas in place for sets of 3 orders of magnitude.

 

Any advice or direction would be much appreciated.

Outcomes