[SalesForce] Using URLencode() not for URLs

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

Best Answer

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.

Related Topic