Hello mtabv,
Just curious to know if there is any specific reason to try to remove the spaces from the code stage versus using the already available Trim string function?
If through the Code stage, which of the 3 BP supported languages are you using - Vb, J# or C#?
Is it right to assume you are trimming data from a Data Item?
Also some screenshots would help to understand more.