Avatar

Correct answer by
Community Advisor

Hi Jaspreet,

Thanks to your screenshot, by now I understand that you leverage External postal mail delivery mode, not Email delivery mode, well sorry for my previous post which was written with Email delivery mode in mind.

First of all, I think the JS filename calculation is fine, it is not a question of instance type variable, it works fine with standard events type var as well.

Here is my workflow:

1298904_pastedImage_0.png

Here is my Javascript activity content to simulate your own one (you need complex calculation so I don't recommend to do it in the Delivery script tab):

vars.calculatedFilename = "D:\Temp\jserge_courrier_externe.csv" ;

Here is my Delivery script content:

delivery.variables._var[0].stringValue = vars.defaultFilename;

Here is my Delivery template file definition:

1299028_pastedImage_1.png

And in the Property tab of the Delivery Template, I define my variable as is:

1299032_pastedImage_2.png

So this configuration works fine and does your requirement.

Please note I define a default value in the Variables of Delivery template,  so it is easier to do Proof and tests outside workflows execution.

Regards
J-Serge

View solution in original post