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.

Can't get FMP data to be exported in an e-mail from FM Server

Featured Replies

Howdy all:

I want to enable users (using WebDirect) to enter their e-mail addresses in a field where when they click a button, the found set is is formatted as an Excel document and is then e-mailed to them from our FM Server (v21.0.2.202.)

I know that the script has to run PSoS, so it's cued for that; the attached is a .pdf of how I have the script coded thus far; the e-mail is sent as instructed, but there isn't an attachment...so where did I muff it with setting up the (virtual) document to be included as an attachment?

 

Cheers,

Rich

Export.pdf

20 minutes ago, Rich S said:

they click a button, the found set is is formatted ...

A script performed on the server runs in its own session. It does not know what the user's current layout, record or found set are. The same thing applies to every other session-specific property, such as global fields or variables. You need to pass these things (or at least some starting point) to the script as the parameter.

I am also puzzled by your script starting with:

If [ $_ExportType = ".xlsx" ]

This test will never be true. A variable prefixed by a single $ is a script variable; if you haven't set it in the current script, it does not exist. This is true for any script, regardless of where it runs. 

 

  • Author

Thanks for the info.

No need to be puzzled by the variable--it's carried over from the script (that fires the PSoS one) because there are three different file types I want to be able to send to the users: .pdf, .csv, and .xlsx. (The variable is created through a button the user clicks to select the file type.) I thought I'd take a whack at the .xlsx one, first, before tackling the others.

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.