How do I get a unique filename while using Data Export?

Greetings Friends,

I have created a Data Export as follows:

As you can see, I am using the Helper.GetUnqiueString() function in the filename, but it is not producing the desired result.

When I export the data, via an action, the filename of the exported data is
[=Helper.GetUniqueString().substr(0,4)]-=Helper.GetUniqueString().substr(4,2)]-=Helper.GetUniqueString().substr(6,2)] Sales Day Book.xls

How do I get a unique filename based on date for the data export?

Thanks & Regards,

1 Like

You cannot put an [=expression] directly in that Filename Parameter. However, you should be able to use this:

D:\SambaRunTime\SambaReports\{DATE:yyyy-MM-dd} Sales Day Book.xls

... or more unique when including Time ...

D:\SambaRunTime\SambaReports\{DATE:yyyy-MM-dd}_{DATE:HH.mm.ss} Sales Day Book.xls

Show your Action and Rule. You should be able to use an [=expression] in the Rule if you set up the Action to use a variable for the file, such as [:fileName]. But you could also use the {DATE:X} tags in the Rule as well.

2 Likes

My action:

My Rule:

thanks a lot for the help, regards…

Ok, I see now that the Data Export Action does not have a Filename parameter, so specifying the File in the Rule/Action is not possible.


You’re welcome.