5 Replies Latest reply on Jun 26, 2017 12:37 PM by Sanford Whiteman

    Need help changing value from 100.0 to 100.00 using Velocity Script

      Hello Community!


      I am tasked with finding out how to add an additional decimal to a value for a numerical token as well as a comma to indicate "thousands". For example, we have a token called {{lead.DBC Balance}} that pulls in how many "savings credits" a person has in their account. Most of our members show as having between "0" and "1000's" of credits; however, some show numbers such as 850.0 or 12500, etc., with only one decimal place after the period and none of them displaying a comma to indicate "thousands" of credits.


      My question is whether I can use Velocity Script to 1. Add a 1/100's decimal place, e.g., instead of just showing 850.0 we would like to show 850.00  & 2. Be able to add a comma indicating thousands, e.g., instead of showing 12500, be able to show, 12,500 or 2,000, etc.


      Thank you for your help in advance!


      Laura Kimball