CONCAT and remove leading 0’s on 2nd Concate Field

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf CONCAT and remove leading 0’s on 2nd Concate Field

  • Creator
    Topic
  • #53533
    Keri Begay
    Participant

      I would like to concat IN1.2 and IN1.3 fields to field IN1.2, ok I have this but now I need to remove the leading zeros from field 2 first then add second.

      IN1.3+In1.2 (minus the leading zeros on the IN1.2) –> IN1.2

      I have a screenshot below if anyone can assist?

    Viewing 1 reply thread
    • Author
      Replies
      • #78036
        James Cobane
        Participant

          Keri,

          You need to strip the leading 0’s on the 3rd element of xlateInVals (as that is your IN1#2 field), then set xlateOutVals to the concatenation of the original IN1#3 and your modified IN1#2.  Remember, you have to treat xlateInVals and xlateOutVals as ‘lists’; i.e.

          lassign $xlateInVals myIN1_3 mySeparator myIN1_2

          set myIN1_2 [string trimleft $myIN1_2 0 ]

          set myList

            set xlateOutVals

              ]

              Hope this helps.

              Jim Cobane

              Henry Ford Health

          • #78037
            Keri Begay
            Participant

              Thank you so much Jim. This worked perfectly.

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