Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Different file names


trevor4370
 Share

Recommended Posts

I have been looking for the answer to this problem and cannot seem to find it (it is very simple if you know how) - if it is on this on forum please point me to it.

 

I have a simple database that records message while people are out (electronic version of the While You Were Out notes). It then sends an email to this person with the message details, also a PDF attachment. I also want a copy of the PDF to be saved in a dropbox folder, but not sure how to change the file name for each pdf file.

Link to comment
Share on other sites

Worked it out - I wanted each message to be saved as a pdf, to a different dropBox folder, depending on the Contact person (example, "Fred Flintstone" has a DropBox folder called "fred Flintstone" and so on for each contact)

 

I have two tables

 

1. While you were out: this records the details of the message, who called, time, message and who message is for etc.

 

2. Send to: this is who the message is for - this has contact id, contact name, email address, Path to DropBox (example: C:/Users/user1/Dropbox/ ), DropBox Folder (name of the folder in dropbox)

 

The script is as follows

 

Set Variable [$FilePath; Value:”filewin:/” & Send to::Path to DropBox & “/” & Send to::DropBox Folder & "/" & while you were out::PDF File Name & ".pdf"

 

 

Save Records as PDF [Restore; No dialog; "$FilePath";Current record]

 

The “while you were out::PDF File Name” generates a different file name for each message.

 

You could use the “message id” but because I used a time stamp and the way I formatted it, Windows didn’t like the file name used, so it generates a windows friendly filename.

 

So now it generates a DPF file for each contact and saves it in the DropBox folder, to a set folder for each contact person.

 

I hope this helps somebody, might be simple for some, but took me a while to work it out; I am not the sharpest knife in the drawer :encouragement:

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

Terms of Use