Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › having trouble trimming spaces
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.
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
not for sure if this is right but I am using but it is not working
set xlateOutVals
]
I tried using
That is giving me |{12345^test, doctor| if I use this how do a get rid of the {
thanks
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
[string trim $fld2]]
that worked thank you.
Mason