July 1, 201114 yr Hi there. Can someone help me at this? I need to be able to export a table as Excel in a temp directory (preferably in a subdirectory from where the .fp7 file resides)and then be sent to a fixed email address as an attachment. Is it possible that the process be started through an IWP session (unsure)? How will I specify the path inside the server machine? More questions upon an answer possibly Thanks in advance.
July 1, 201114 yr With the little you've provided, I'll just say Yes, it's all possible. You could set a flag to queue the export and email in a server script. The server script runs (as often as you like) and Finds the queued record. If no recs found, it halts. Otherwise, it'll set $exportPath to Get (TemporaryDirectory) & "filename.xls", Export Records $exportPath, then Send Mail attaching $exportPath.
July 2, 201114 yr I need to be able to export a table as Excel in a temp directory (preferably in a subdirectory from where the .fp7 file resides) FMS can only export to two locations: its own Documents folder, or a special Temp folder that gets created by the script and deleted when the script is done. So if you want to have file end up anywhere else you'll have to use a FMS sequence schedule to use the OS to move the file after the FM script is done...
July 4, 201114 yr Author With the little you've provided, I'll just say Yes, it's all possible. You could set a flag to queue the export and email in a server script. The server script runs (as often as you like) and Finds the queued record. If no recs found, it halts. Otherwise, it'll set $exportPath to Get (TemporaryDirectory) & "filename.xls", Export Records $exportPath, then Send Mail attaching $exportPath. FMS can only export to two locations: its own Documents folder, or a special Temp folder that gets created by the script and deleted when the script is done. So if you want to have file end up anywhere else you'll have to use a FMS sequence schedule to use the OS to move the file after the FM script is done... Thanks a lot bcooney and Wim, that's just about all I really needed to know ! One last question Wim, when you say "its own Documents folder" you mean the directory tree where it is installed, or the "Documents" folder?
Create an account or sign in to comment