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)=%%

2
  • 1
    Looks like you have come curly-apostrophes in there. Nov 27, 2018 at 22:52
  • Also, it needs to start from 18 I think, not 21. Nov 28, 2018 at 10:21

1 Answer 1

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.

You must log in to answer this question.

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