having trouble trimming spaces

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf having trouble trimming spaces

  • Creator
    Topic
  • #48821
    Mason Miller
    Participant

      I am trying to trim spaces from a segment

      example |123456        ^test, doctor|

      needs to be

      |123456^test, doctor|

      I am using

      set var1 $xlateInVals

      set  xlateOutVals “[string trimright $var1]”

      what am I doing wrong I cannot get this to work at all.

    Viewing 3 reply threads
    • Author
      Replies
      • #59801
        garry r fisher
        Participant

          Hi,

          xlates use LIST’s. See:

          https://usspvlclovertch2.infor.com/viewtopic.php?t=1460

          Hmmm – Not sure how you link a post in the forum but seach for ‘space’

          Regards

          Garry

        • #59802
          Mason Miller
          Participant

            not for sure if this is  right  but I am using but it is not working

            set xlateOutVals

              ]

              I tried using

              set xlateOutVals

                That is giving me |{12345^test, doctor|  if I use this how do a get rid of the {

                thanks

              1. #59803
                Charlie Bursell
                Participant

                  The problem is you have two subfields in your data and are trying to trim only the first one.  Try this:

                  lassign $xlateInVals fld1 fld2

                  set xlateOutVals

                    [string trim $fld2]]

                  1. #59804
                    Mason Miller
                    Participant

                      that worked thank you.

                      Mason

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