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

  • Where are you sending this email from? What are you using to send this email? – dphil Apr 23 '14 at 16:19
  • Sorry, thought my post tag helped categorizing the conversation. I use Exact Target. Thanks for jumping in. – Snowalker Apr 23 '14 at 16:44
  • can you verify that the data doesn't have spaces? – Kelly J Andrews Apr 23 '14 at 16:51
  • 2
    I should probably look at tags better... I probably should know what Exact Target is before trying to help. – dphil Apr 23 '14 at 16:59
  • Did this end up working for you? If so, make sure you mark the question answered. – Kelly J Andrews Apr 24 '14 at 11:30
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),'%')=%
  • 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 Apr 24 '14 at 16:57
  • Good point - and not a bad practice - edited. – Kelly J Andrews Apr 24 '14 at 17:33
  • Thanks Kelly, it seems Concat is doing the same thing. e.g. %%=Concat(rate,'%')=%% – Snowalker Apr 25 '14 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.