Rich S Posted August 7, 2024 Posted August 7, 2024 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
comment Posted August 7, 2024 Posted August 7, 2024 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.
Rich S Posted August 7, 2024 Author Posted August 7, 2024 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.
comment Posted August 10, 2024 Posted August 10, 2024 On 8/7/2024 at 11:24 PM, comment said: The same thing applies to every other session-specific property, such as global fields or variables. Except for account name: https://help.claris.com/en/pro-help/content/running-scripts-on-server.html 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now