Skip to main content
derrickr8850025
Level 2
Jan 18, 2019 6:02 PM UTC
Solved

Trailing/Footer Record

Hi

I've created a data extraction within Adobe. Curious, but I need to add a trailing record that includes ABC and then the count of records in the file.

Any ideas?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Jonathon_wodnicki
Jonathon_wodnickiAccepted solution
Community Advisor
Jan 18, 2019 9:49 PM UTC

Hi,

Add a JS activity afterward appending to the same file 'ABC' + vars.recCount

Thanks,

-Jon

5 replies

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
Jan 18, 2019 9:49 PM UTC

Hi,

Add a JS activity afterward appending to the same file 'ABC' + vars.recCount

Thanks,

-Jon

Translate
derrickr8850025
Level 2
Feb 6, 2019 4:30 PM UTC

Would you be able to provide a sample that does this?

Translate
Jonathon_wodnicki
Community Advisor
Community Advisor
Feb 6, 2019 10:18 PM UTC

Hi,

From the product doc, put this in a js activity after extract:

var f = new File('c:/file.txt'); 

f.open('a'); 

f.writeln('ABC' + vars.recCount);

f.close();

Thanks,

-Jon

Translate
ravitejagundu
Level 3
Mar 1, 2019 2:17 PM UTC

Hi Wodnicki

Is the trailing record is adding the same extracted file(.txt or .csv) or it is saving in the other file?

Thanks,

Raviteja.

Translate
Jonathon_wodnicki
Community Advisor
Community Advisor
Mar 1, 2019 8:21 PM UTC

Use the same name as extracted file, the 'a' arg to File.open() is append. Name may be available as vars.filename in the extract's transition, though more stable to just repeat the filename in case someone shuffles workflow around later.

Translate