Find your content:

Search form

You are here

How to make a space disappear from between the value and percent sign?

 
Share

this is a quick one. In one of the emails we are about to send out there is a weid space appearing in between the value pulled in through AMPscript and the % sign.

E.g. %%rate%%%

Result:

7.99 % instead of 7.99%

I checked the data but there is no space in there, it's just the number (e.g. 7.99). Also the same data file it's used for a different email and that one renders properly.

Any thoughts?

Thanks, Vic


Attribution to: Snowalker

Possible Suggestion/Solution #1

Tested this in my account, and the values came back exactly as you would expect. I would suggest using the Trim() function.

%%=Trim(rate)=%%%

That will produce the correct result. Most likely it's a data issue.

edit

To Vic's point below - Concat will work. Best practice would be to also account for any extra white space, you you could also do:

%%=Concat(Trim(rate),'%')=%

Attribution to: Kelly J Andrews
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/33487

My Block Status

My Block Content