Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to Export as Excel > E-mail from FMS?

Featured Replies

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 :B

Thanks in advance.

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.

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...

  • 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?

See http://www.fmforums.com/com/training/server-side-imports-and-exports-r21

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.