0

I'm facing an issue trying to evaluate a concatampscript function and variable saved in a data extension attribute.

I tried to evaluate them with treatAsContent function but it's still not evaluated. Also tried to use get and setValue in SSJS.

(I MUST manage the text wording in the data extension)

Data Extension

  %%[ var @MyAccountURL, @lang, @Body
    set @MyAccountURL = "https://www.levana.io/"
    set @lang = "US"
    
    set @Body = Lookup('NL_Registration_Content_Copy',@lang,"Email_Variable_Name", 'Body')
   
    ]%%
    
    <br> @lang =<br> %%=v(@lang)=%%
    <br><br> @MyAccountURL =<br> %%=v(@MyAccountURL)=%%
    <br>
    <br><br> Body = <br> %%=v(@Body)=%%
    <br><br> BodyTreatAsContent  = <br> %%=v(treatascontent(@Body))=%%

The Output is :

@lang = US

@MyAccountURL = https://www.levana.io/

Body = concat("Your Account link is : ",@MyAccountURL," .")

BodyTreatAsContent = concat("Your Account link is : ",@MyAccountURL," .")

4
  • Why don't have the text only in DE and just have conact in the ampscript? Nov 13, 2020 at 20:19
  • If you want that link to be functional and tracked, you will have to split the DE content so that the link is on its own and can be wrapped in ana tag and a redirectTo() function. salesforce.stackexchange.com/questions/326137/… - or do you simply want the URL to be there as a piece of non-clickable text? Nov 13, 2020 at 21:21
  • @SwatiMishra - I noted that this is my UseCase. The client will manage change many times the traductions. Nov 13, 2020 at 21:44
  • @JonasLamberty - the link is just an exemple, I will have standard fields like FirsName, LastName... Nov 13, 2020 at 21:44

1 Answer 1

1

For this to work, you need ampscript tags in your data extension field contents. For example for US should be

%%=concat("Your Account link is : ",@MyAccountURL," .")=%%

Instead of

concat("Your Account link is : ",@MyAccountURL," .")

You must log in to answer this question.

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