AnsweredAssumed Answered

HELP!  Cannot Export Records from Web

Question asked by fdenman on Aug 27, 2014


HELP!  Cannot Export Records from Web



     I'm very  new to Filemaker and can't seem to figure out the solution to my problem.  I have a web page that calls a script
     "tlcompleters".  the script basically goes to the last record in the dates table, and sets a global variable equal to the "completeddate" field.  I perform a find, searching for records equal to the global variable.  I then export and email those records in csv format.  The script works if i run it from the client, but it will not work if i run it from a web page.  I've read a few post and understand that the "Export Records" function is not compatible with web publishing.  I was hoping that someone has a work around for this OR perhaps could a web publishing script call a client script to export the records?   Below is my script, any help is truely appreciated!!!!!

     /* web page call to script
         $scriptName = 'tlcompleters';
         $script_object = $fm->newPerformScriptCommand($layoutName, $scriptName);
         $script_result = $script_object->execute();


     /* client script
     Go to Layout ["dates" (dates)]
     Go to Record/Request/Page [Last]
     Set Variable [$$completeddate; Value:dates::completeddate]
     Go to Layout ["students" (regstu)]
     Enter Find Mode []
     Set Field [regstu::completeddate; $$completeddate]
     Set Error Capture [On]
     Perform Find []
     Set Variable [$docpathtlcompleters; Value:Get ( DocumentsPath ) & "tlcompleters.csv"]
     Export Records [No dialog; "$docpathtlcompleters"; Macintosh]
     Send Mail [Send vial E-mail Client; No dialog; To:; Subject: "TL Completers Export"; Message "see attachment"; "$docpathtlcompleters" (NOT COMPATIBLE)]