April 1, 200520 yr I have a Send Mail script that is supposed to perform a find, take the info from the found records and place it in the body of the email, set the to: and subject: lines and open up the users email client. It works most of the time, but sometimes when the email opens it will be completely blank, even though it still performed the find and the script did not stop. Does anyone know why the emails would sometimes be blank? I can post my script in here if it will help.
April 1, 200520 yr Author Here is the script. I used a lot of Commit Records because someone told me that may be the problem....? Commit Records/Requests [ Skip data entry validation; No dialog ] Show All Records Go to Related Record [ From table: "Market Reseach Catalog 2"; Using layout: <Current Layout> ] [ Show only related records ] Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Market Reseach Catalog::Include in email: ""Yes"" ] [ Restore ] Commit Records/Requests Set Field [ Market Reseach Catalog::FoundCount; Get(FoundCount) ] Go to Record/Request/Page [ First ] Loop Set Field [ Market Reseach Catalog::g_Combine all; Market Reseach Catalog::g_Combine all & "
April 1, 200520 yr Could you please try to remove the Commit Records/Requests which is after the script step "End Loop". Try also removing the Commit records/request script step which is after the find records script step. Second thing which I would suggest is move the script step "set field (market research catalog::g_Combine all;"")" before we start the loop or after the send mail script step. I don't think it should make a difference but please give it a try. --Sanjai
April 2, 200520 yr Hi - I have experienced similar strange behavior when calling the Send Mail script step in FileMaker before launching my mail client. Could that be related to your problem? ltr, j
April 8, 200520 yr Author My mail client is always open before I run the script. I have made the changes to the script that Sanjai listed above but I am still encountering the problem. It is weird because if it opens a blank email and I go in and run the script again it works... Its driving me nuts and delaying my development...any other ideas?
April 12, 200520 yr Hi, Sorry to hear that the above suggestion didn't work. Could you please try using a pause script step just before the send mail script step. Keep a pause of one second. I had experienced this problem while working on visual basic and this problem was because of multithreading. So I had to pause it for 1 second such that the output of one thread could be used as an input to the thread which sends email. --Sanjai
April 13, 200520 yr Author Thanks Sanjai...I was thinking the same thing about adding a Pause. It seems the script is trying to run too fast before it can gather the information. Hopefully this will help.
April 19, 200520 yr Author Unfortunately...no. People are still having this problem. i have even encountered it myself. I wonder if there is something that is ordered wrong in my script? This is really frustrating me. I thought the above solution would have worked. Any other ideas? Thanks!
April 19, 200520 yr Hmmm. Would you mind sharing the file with me so that I can have a look on it and try what can we do to resolve your problem. --Sanjai
April 19, 200520 yr Author I cant share the file because it has secure information, but I was thinking about perhaps a different method of notification, rather than an email. the only point of the email is for other users to notify me that there are new records that need my attention. have any ideas on alternate notification methods? perhaps just flagging the records, or exporting some other way (xml?). i would like it if i did not need to go into filemaker to see if there are new records (which is why i liked email)
Create an account or sign in to comment