August 7, 20241 yr 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
August 7, 20241 yr 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.
August 7, 20241 yr 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.
August 10, 20241 yr 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
Create an account or sign in to comment