Skip to main content
Level 2
Jan 20, 2021 9:43 AM UTC
Solved

How to get the value of the variable obtained by JS in the body of the Recurring delivery.

Hello.

 

I want to know, How to get the value of the variable obtained by JS in the body of the Recurring delivery.

For example, get the date. It into the Email body.

Email is a Text Email.

It is not a HTML Email.

 

JS

instance.vars.yearTest = formatDate (new Date(), "%Y")

logInfoz("yearTest = [" + instance.vars.yearTest + "]");

 

Recurring delivery

<%= $(instance/vars/@yearTest) &>

 

This will give an XFR-180000 error.

I don't think I understand correctly...

 

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ParthaSarathy
ParthaSarathyAccepted solution
Community Advisor
Jan 20, 2021 10:08 AM UTC

Hi @uz2020 ,

Step 1: Right click recurring delivery > open > in script tab add this below code

delivery.variables._var[0].stringValue=instance.vars.yearTest;

 

Step 2: In delivery property 'Variable' tab, Add > Define Name and dataType alone 

(for eg, Name = yearTest and Data type = Text) and save the delivery.

Step 3: Go to your text content tab, you can select your variable as shown below,

 

 

Regards,

ParthaSarathy S

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups

6 replies

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
Jan 20, 2021 10:08 AM UTC

Hi @uz2020 ,

Step 1: Right click recurring delivery > open > in script tab add this below code

delivery.variables._var[0].stringValue=instance.vars.yearTest;

 

Step 2: In delivery property 'Variable' tab, Add > Define Name and dataType alone 

(for eg, Name = yearTest and Data type = Text) and save the delivery.

Step 3: Go to your text content tab, you can select your variable as shown below,

 

 

Regards,

ParthaSarathy S

Translate
~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
uz2020Author
Level 2
Jan 21, 2021 9:11 AM UTC
Hello, @parthasarathy , Thanks for your quick reply! Thanks to you, I understand how to read variables. But the XFR-180000 error is still not resolved. I have confirmed the operation with the following simple set. Start-> JS -> Recurring delivery Do I need to other setting Adobe Campaign? Thanks.
Translate
Sukrity_Wadhwa
Level 4
Jan 27, 2021 11:39 AM UTC

Hi @uz2020,

Were you able to resolve this query or do you still need more help here? Do let us know.

Thanks!

Translate
Sukrity Wadhwa