Sending a report to a list - how to set and pass variables? | Community
Skip to main content
marcinkacz
Level 3
Feb 14, 2018 12:58 PM UTC
Solved

Sending a report to a list - how to set and pass variables?

Hi,

I'm trying to build a workflow that sends one of my custom made report to a list. I'm fallowing these process: https://docs.campaign.adobe.com/doc/AC/en/WKF_Use_cases_Sending_a_report_to_a_list.html

My issue is related to variables. First step of my report's template is choosing dates (time range of report).

Dates are stored in two variables: endDate and startDate:

My question is: how to set and pass these variables to xtk.report.export method (launched in JS activity)?

My code:

var reportName = "throughputNew";

var path = "/home/reports/"+"throughputNew"+".xlsx";

var exportFormat = "OOXML_SS";

isAdHoc = false;

var _ctx = <ctx _context="global" _reportContext={reportName}/>;     ///// I guess variables should be set up somewhere here, but how?

xtk.report.export(reportName,_ctx,exportFormat,path,isAdHoc);

Thank you in advance,

Marcin

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
May 1, 2018 11:17 AM UTC

Hello,

ctx variables are to be found under

ctx.vars.yourVariable

You can see what else is there in you pipeline by throwing exception by logError() and check the debug mode on report preview.

Marcel

3 replies

Marcel_Szimonisz
Marcel_SzimoniszAccepted solution
New Participant
May 1, 2018 11:17 AM UTC

Hello,

ctx variables are to be found under

ctx.vars.yourVariable

You can see what else is there in you pipeline by throwing exception by logError() and check the debug mode on report preview.

Marcel

Translate
florentlb
Level 10
Apr 4, 2018 11:01 AM UTC

Hi Marcin,

Any update to share?

Florent

Translate
florentlb
Level 10
Mar 12, 2018 5:42 PM UTC

Hi Marcin,

I am unfamiliar with AC Classic reports and JS. Did you find a way through it? Don't hesitate to bump the thread to update us on your progress (or not).

Florent

Translate