5 Replies Latest reply on Oct 27, 2017 9:29 PM by Sanford Whiteman

    Valocity scripting token not working.

    DeAnna Humphrey

      Why is my script working in one of my workspaces and not the other?

       

      ## First, covert the variable to currency format

      #set($total = $number.currency($${lead.Finance_Savings__c})) ##our code from before, e.g., $121,237.10

      #set($stringLength = $total.length() - 3) ##get the total string length and calculate what we want to keep, e.g., 8 --note the specific spacing between the commands here! screwing up the syntax will crash it (e.g. if you remove the space)

      #set($totalb = $total.substring(0,$stringLength)) ##takes the sub string of just the first 3 characters, e.g., $121,237

      ## Then, for the email output

      ${totalb}

      @