Export to a CSV file and download | Community
Skip to main content
Level 2
January 26, 2023
Solved

Export to a CSV file and download

  • January 26, 2023
  • 3 replies
  • 2613 views

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by CedricRey

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

3 replies

Craig_Thonis
Adobe Employee
Adobe Employee
January 26, 2023

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 😉.

 

 

 

dgangulyAuthor
Level 2
January 26, 2023

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

CedricRey
CedricReyAccepted solution
Level 5
January 27, 2023

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

ParthaSarathy
Community Advisor
Community Advisor
January 27, 2023

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

 

 

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 S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
Sukrity_Wadhwa
Community Manager
Community Manager
February 9, 2023

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