3

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

5
  • Where are you sending this email from? What are you using to send this email?
    – dphil
    Commented Apr 23, 2014 at 16:19
  • Sorry, thought my post tag helped categorizing the conversation. I use Exact Target. Thanks for jumping in.
    – Snowalker
    Commented Apr 23, 2014 at 16:44
  • can you verify that the data doesn't have spaces? Commented Apr 23, 2014 at 16:51
  • 2
    I should probably look at tags better... I probably should know what Exact Target is before trying to help.
    – dphil
    Commented Apr 23, 2014 at 16:59
  • Did this end up working for you? If so, make sure you mark the question answered. Commented Apr 24, 2014 at 11:30

1 Answer 1

2

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),'%')=%
3
  • Also as a side note, its probably a good idea to use the HTML code for a percent sign since perecent signs are used in the AMPscript syntax. I would rewrite Kelly's code as %%=Trim(rate)=%%% -- % is the HTML code for '%'
    – Jon Sakas
    Commented Apr 24, 2014 at 16:57
  • Good point - and not a bad practice - edited. Commented Apr 24, 2014 at 17:33
  • Thanks Kelly, it seems Concat is doing the same thing. e.g. %%=Concat(rate,'%')=%%
    – Snowalker
    Commented Apr 25, 2014 at 17:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .