Export text file using current file name or current date

Is there a way (through a procedure or a template) to export a text file using the current Panorama file name?

On a separate note, can a procedure or template insert the current date in the exported file name, i.e. “230504 PanoramaFileName.txt”

Thanks for your help! I’m trying to figure out how to make my templates for different files more efficient.

filesave saves text to a named path.

info(“databasename”) gives you the name of the current database (Panorama file), and datepattern(today(),"YYMMDD") will give you today’s date in the format you suggest. You could use those to construct the filename for the above.

When you use the wizard, the Panorama file name with an appropriate extension is the default.

In a procedure, the file name would be a formula. To get the name in your example, you would use

replace(datepattern(today(),"YY MM DD")," ","")+" "+info("databasename")+".txt"

as the formula.

That particular pattern isn’t one that the function supports. I originally wrote my formula with that pattern, but when I tried it, all I got was the pattern itself.

OK, I’ll add it to my wish list. Thanks again for taking the time to respond!

Same here (in the formula workshop) but then (1) I changed it to YYYYMMDD, which correctly gave 20230504, and (2) I then deleted two of the Ys to revert to YYMMDD, and that then correctly gave 230504.

Needless to say, after experimenting for the formula workshop for a couple of minutes I can now no longer edit the formula, or rather it doesn’t display the current formula (see various people’s previous posts) for which the only cure is to quit Panorama. That’s not convenient at this moment because I’m in the middle of something.

Thank you both so much! It worked! I used:

databaseexportusingformula replace(datepattern(today(),“YY MM DD”)," “,”“)+” “+info(“databasename”)+”.txt" [followed by the fields)

And it generated the correct date and the name of the file! This will save me SO much time, and I could never have found it on my own. So thank you again!

Apparently, it is supported, and I made some sort of mistake when I first tried it. When I checked the documentation, it listed “YYYYMMDD” as a valid component, but it didn’t list “YYMMDD”. So I went looking for a workaround. Now, when I try “YYMDD” again, it works every time.