0

A field used in a sendable data extension contains a value that I'm trying to remove the beginning characters from then add the remaining characters to the end of a different URL.

Example:
Data Extension Value (everything after the '/' is unique to each record): 'www.mywebsite.com/bill'
Target URL: 'www.differentwebsite.com'
Desired Outcome: www.differentwebsite.com/bill

I believe I could accomplish this with the substring and concat function, but can't seem to figure out the proper formatting as I receive an error stating:

The function call uses an unrecognized function name. Function Name: ‘AttributeValue Function Call: ‘AttributeValue("websiteURL")*

Here's what I tried so far:

%%[

Set @pws = Substring(‘AttributeValue("websiteUrl")’,21)
Set @link1 = Concat('http://differentwebsite.com', @pws)
]%%

With the asset linked to: %%=Redirect(@link1)=%%

  • 1
    Looks like you have come curly-apostrophes in there. – Adam Spriggs Nov 27 '18 at 22:52
  • Also, it needs to start from 18 I think, not 21. – Selim Sevim Nov 28 '18 at 10:21
0

Ended up modifying to the following to get the desired result:

%%[

Set @pws = Substring(AttributeValue("websiteUrl"),21) Set @link1 = Concat('http://differentwebsite.com', @pws) ]%%

Note for my specific case '21' was the correct number of characters to cut off at, in the example scenario I posted it should be '18' as Selim mentioned.

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.