Hi,
I am trying to do something similar and send the exported data via an email (Delivery Template) using the calculated attachment option 'File name is computed during delivery of each message'.
Would there be a way to programmatically get the path to this exported file so I can set it as an option using: setOption('myFIleAttachment', <path_to_file>)
and then being able to retrieve it from the Delivery using <%@ include option='myFIleAttachment' %>
I hate hard coding things. But this is what I have so far:
vars.filename = '/usr/local/neolane/nl6/var/' + getOption('NmsTracking_Instance') + '/export/Data_Extract_' + formatDate(new Date(), "%4Y-%2M-%2D") + '.csv';
setOption('myFIleAttachment', vars.filename);
Thanks,
Justin.