Expand my Community achievements bar.

Join us for the Adobe Campaign Community Q&A Coffee Break on 30th September at 8 am PT with Campaign experts Arthur Lacroix and Sandra Hausmann.
SOLVED

Export to a CSV file and download

Avatar

Level 2

Hello All,

 

While I was referring to this blog 

https://blog.floriancourgey.com/2021/07/adobe-campaign-insert-raw-data-in-workflow, is it possible to export the result of the records/data inserted in the temporary workflow table, abd download the same locally.

 

We are using Adobe Managed Acc-v8

 

Regards,

DG

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

the Craig’s answer is correct but your case is special : the JS activity doesn’t expose the new fields you may create with your script. The console won’t « see » them. 

the best way to export new values in this case is to « prepare » the table structure above (with a query or enrich activity). You have to create empty columns you will fill with empty value expression (if it’s a string, just put ‘’ in the expression, if int, then 0, if date then ##). Name it correctly (I suggest to use simple alias)

Then fill the value (with insert or update) with your script. This way, the workflow form will « know » the real table structure and expose all your datas in the preview transition form. 

cedric

View solution in original post

5 Replies

Avatar

Employee Advisor

Hi Dganguly,

 

If you are talking about downloading the temporary data to your local computer, then you can do this by opening up any activity transition or previewing a query activity. From there you can right-click and select the export option to export and download the file locally.

 

You may be able to configure some javascript to export it to the local hosting machine or an SFTP site if desired, but I'll leave that to someone who is better at coding than I am .

 

 

 

Avatar

Level 2

Hi @Craig_Thonis

When we use JS Activity to add data into the table, the way the link explained we see that the transition doesn't show that value. So we cant export the data value of the Temporary WF Table using transition.

 

Regards,

DG

Avatar

Correct answer by
Community Advisor

Hi,

the Craig’s answer is correct but your case is special : the JS activity doesn’t expose the new fields you may create with your script. The console won’t « see » them. 

the best way to export new values in this case is to « prepare » the table structure above (with a query or enrich activity). You have to create empty columns you will fill with empty value expression (if it’s a string, just put ‘’ in the expression, if int, then 0, if date then ##). Name it correctly (I suggest to use simple alias)

Then fill the value (with insert or update) with your script. This way, the workflow form will « know » the real table structure and expose all your datas in the preview transition form. 

cedric

Avatar

Community Advisor

Hi @dganguly ,

If you are adding data/field inside the JavaScript by creating variable or instance variable, You can bring those field to transition by adding an enrichment next to JavaScript.

 

Example, If you are creating this two data fields in JavaScript,

 

 vars.field1 = '1';
 instance.vars.field2 = 'abc';

 

Next to JavaScript, add an enrichment, and configure the below in Add data

 

$(vars/@field1)
$(instance/vars/@field2)

//and Add Label and Alias for both

 

ParthaSarathy_0-1674798551029.png

 

So that you can able to see this both field1 and field2 in enrichment transition.

And as Craig mentioned, Display the target > Right click the preview data > Export and save it in local.

ParthaSarathy_1-1674798668749.png

 

Avatar

Administrator

Hi @dganguly,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!



Sukrity Wadhwa