AnsweredAssumed Answered

FM13: script to save records as PDF with dynamic naming and save to Dropbox

Question asked by KristinThomson on Jan 6, 2014
Latest reply on Jan 6, 2014 by KristinThomson

Title

FM13: script to save records as PDF with dynamic naming and save to Dropbox

Post

     I am nearly complete a FM13 database that will be accessed simultaneously by about 10 users.  We are using a FM hosting company to host the file, and most users will access though WedDirect.

     One of the tasks that users do is save a current record as a PDF and then email the PDF to a client. I was able to successfully write a script that used values to dynamically name the PDF, and automatically save it to a specific folder on my hard drive. Here is an example of a working script:

       Set Variable [$filename; Value: Events::Headliner & " @ " & Events::Venue name & " " & "Changesheet #.pdf"
       Save Records as PDF [Restore; No dialog; "$filename"; Automatically open; Current record]

     Output File Path List:

       filemac:/Macintosh HD/Documents/Working/Bonfire/shows/$filename

     However, as we implement this FM database, I can't figure out how to designate a filepath that will write PDFs to a shared Dropbox folder. I was able to do it for my own access to Dropbox, like so:

       Set Variable [$filename; Value: Events::Headliner & " @ " & Events::Venue name & " " & "Changesheet #.pdf"
       Save Records as PDF [Restore; No dialog; "$filename"; Automatically open; Current record]

     Output File Path List:

        filemac:/Macintosh HD/Users/kristin/Dropbox/Bonfire/offers/$filename

     ...but script doesn't work if I login as another user or access via WebDirect. Clearly, the filepath needs variables -- and I've tried many -- but I can't get it to work. Any tips would be greatly appreciated.

     Kristin

      

Outcomes