tcl string length > 2000 replace a string

Clovertech Forums Read Only Archives Cloverleaf Tcl Library tcl string length > 2000 replace a string

  • Creator
    Topic
  • #50230
    Ganesan Murali
    Participant

      I’m new to tcl.

      Can you pls help me guys.

      I need to check the NTE-3.1 text length …

      if NTE-3.1 > 2000 characters then

           i need to replace the NTE3.1 = ” Refer to Web Module”  

      if NTE-3.1 < 2000 characters then      no change – send the same NTE-3.1 source string. Pls help . Thanks.

    Viewing 0 reply threads
    • Author
      Replies
      • #65277
        Rob Abbott
        Keymaster

          In your COPY statement, put the following in the “pre” Tcl

          Code:

          if { [string length [lindex $xlateInVals 0]] > 2000 } {
           set xlateOutVals [list “Refer to Web Module”]
          }

          Rob Abbott
          Cloverleaf Emeritus

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