Precision in XLate

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Precision in XLate

  • Creator
    Topic
  • #47772
    Brian Goad
    Participant

      I am modifying a field that has a value like this: 123456.00. I want to strip off the “.00”. Is this possible in straight up translate or is code required to complete such an action. I have begun the writing of the code to do this but would like to know if and how to do it in an xlate if possible.

      Thanks in advance,

      Brian

    Viewing 0 reply threads
    • Author
      Replies
      • #56677
        Anonymous
        Participant

          Brian,

          if the “.00” is always there, you can just put the line

          set xlateOutVals [string range $xlateInVals 0 [expr [string length $xlateInVals] – 3]]

          in your Xlate.  You can’t do it with just your Xlate, but one line in your Action can.

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.