2

I am trying to create a URL with query strings. The full URL contains many other things but the main focus now is to get the Full name to be displayed properly with URL encoding.

I thought URLencode() might do the trick but it seems that it doesn't work for stuff that are not full URLs.

In short one part of the query string should have the Full name URLencoded. So pretty much: URLEncode(@fullname) when the full name is the [Full Name] attribute.

I tested it though and it doesn't seem to work. http://view.crm.kaplaninternational.com/?j=febe17787c61017e&m=fe9a13707567017e76&ls=fe3915717665067e771d70&l=ff601c7577&s=fe5717717c61017b7113&jb=ffcf14&ju=%20style=?utm_medium=email&utm_source=news&utm_campaign=EN-EN-teal-news-Datacorrtest%2bsomething&utm_content=389553

The blue text above the "Full name URL encode" should be the URLencoded form of the first name. So it should have "%20" instead of a normal space. But it doesn't seem to work.

Here is the full AMPscript I am aiming to use for the full URL: http://www.snipsave.com/user/profile/balintsipos#8689

Any ideas guys if I am the one doing something wrong or the URLencode() function is not even supposed to work on non-URLs. If it doesn't what other alternatives I would have to encode the Full name?

thanks a lot in advance for any help you can give me.

Balint

1 Answer 1

1

SET @fullnameURLencode = URLEncode(@fullname,0,1)

https://developer.salesforce.com/docs/atlas.en-us.mc-programmatic-content.meta/mc-programmatic-content/urlencode.htm

Documentation gives a pretty good run-down of the use of the URLEncode function. B2 allows for encoding full string even if not a valid URL.

4
  • Hey Alex, thanks for the help. it seems that the ET help wiki is more detailed than code.exacttarget :) I have gone ahead and tested it. URLEncode(@fullname,0,1) > putting %20 for spaces but does not encode anything else (special characters) URLEncode(@fullname,2,1) > encoding special characters but puts a "+" for space. which is correct? having %20 or + for space?
    – Balint
    Commented Aug 26, 2014 at 14:22
  • first> view.crm.kaplaninternational.com/… second > view.crm.kaplaninternational.com/…
    – Balint
    Commented Aug 26, 2014 at 14:22
  • damn the second one was (@fullname,1,1) not 2,1. sorry
    – Balint
    Commented Aug 26, 2014 at 14:34
  • (@fullname,1,1) will give you + instead of %20. Either of these are acceptable in a URL string Commented Aug 26, 2014 at 15:48

You must log in to answer this question.

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