gowrann Posted March 4, 2004 Posted March 4, 2004 I would like to create a script that emails a certain user all the record data every time a record is created - how can I do this?
kenneth2k1 Posted March 4, 2004 Posted March 4, 2004 Hi: There are a few options here. Is this for a web solution, or local use?
gowrann Posted March 4, 2004 Author Posted March 4, 2004 Ideally I am setting up in IWP and when a web user hits submit after entering their data, then I want the email script to occur.
kenneth2k1 Posted March 4, 2004 Posted March 4, 2004 Unfortunately this can't happen in a script real time for the user since you are using IWP. What you can do is have a script run daily that finds recs made that day and don't have a field checked (or whatever sort of find script used to find recs that need to be e-mailed). You might want to e-mail a report or list of new recs and other detail. If you do this I suggest the SMTPit and Troi Activator plugins to make the process easier. The File Plugin migth be good also, but there are other plugins that do the same thing. Consider also how automated you want to make this. You could just manually run the script every day and find records for viewing remotely. Since there are many ways to "skin a cat," perhaps you will want to tell us what type of system this is and how it is used.
mindtpi99 Posted March 4, 2004 Posted March 4, 2004 I use an AppleScript that runs at a specified interval to trigger a Filemaker that emails various users lists of their jobs that are due the next day. It's not the most elegant solution but it works well for me...Bear in mind though that this is running on the same machine as FileMaker and isn't being triggered over the web or anything
mindtpi99 Posted March 4, 2004 Posted March 4, 2004 Also, I'd skip IWP and use CWP then you can include the -MailTo tag in a form. Also, it's not a good idea to use scripts in a web solution as it's not multithreaded, i.e., if you run a script FileMaker has to wait until it's finshed. Additionally, if the script brings up a dialog box FileMaker will pause until it's clicked
gowrann Posted March 4, 2004 Author Posted March 4, 2004 Hi mindtpi99 This applescript could be good for me, I am talking low volumes here....platform is OSX Server (Jaguar) running FM Unlimited 6.0XX - my CWP skills are zero.
mindtpi99 Posted March 5, 2004 Posted March 5, 2004 Here you go; on idle tell application "FileMaker Pro" activate tell window "databasename" to do script FileMaker script "script name" end tell return 60 * 1 end idle As above, every 60 seconds (from the time it was first launched) the AppleScript runs a FileMaker script. Therefore, if you want to make it every hour change 60 to 3600 and so on. You'll need to create a Filemaker script that finds the data you want, loops through each record and sends an email. No doubt this is technically a terrible way to do it but it does work and is simple cheers Howard script.pdf
Recommended Posts
This topic is 7571 days old. Please don't post here. Open a new topic instead.
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