Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Send Mail script opens up blank email sometimes


This topic is 7150 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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 & "

Posted

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

Posted

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?

Posted

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

Posted

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.

Posted

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!

Posted

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

Posted

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)

This topic is 7150 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.