Script: Save as .pdf with current date in the file name
I have a script which saves records as a .pdf. How do I save records with a date in the name?
Day( Get ( currentdate ) ) & "-" & Month ( get ( currentdate ) ) & "-" & Right ( Year ( Get ( currentdate ) ) ; 2 ) & "-ClientRecords"
If "ClientRecords is text in a text field, you'll need to edit the last term to refer to the table instead of literal text.
If the date is stored in a date field, Replace each instance of Get ( currentdate ) with the name of the table and field that holds the date.
Could you please help me a little more.
I am using the Save Records as PDF script step.
How do I add that calculation so that that is what the file saves as? Which settings do I have to select?
Set Variable [$Path; Value: <<Put your expression here for the location and name of the file, including the above date calculation>>]
Save Records as PDF [$Path; <<other options you can specify such as "current record" or "Records being browsed>>]
You'll have to figure out what file path you want to use to specify a location to which you'll save the file. This can be straight text or you can use functions such as Get ( TemporaryFolder) to help compute the path.
Click the specify ouput file option for Save Records as PDF to see examples of different file paths.
Can you explain how you got this to work. I'm getting an error every time, I'm not doing something right.
Retrieving data ...