Thank you for your post.
A script error 101 means "Record is missing", so the last sentence "Contact information not specified" appears to support this. You can find a complete list of FileMaker error codes at:
Can you post your script? Is it possible you are referencing a record that does not exist?
Do you have FileMaker Pro Advanced? If so, you can move the file from the server to your local drive, step through the script and see where it fails.
Any other information you can provide may be helpful.
Thanks TSGal.All records exist and all contacts have valid email addresses and are receiving the Snapshot Link with their email.What is the best way to post the script? I can "Print to File" from Windows, but when I try to open in MS Word it displays a lot of formatting stuff.I inadvertently rated you a "Best Answer." Please excuse my being a bit new at this.Brooks
You can print the script to a text file, and then open the file using Notepad (Windows Utilities), and then copy and paste into a reply.
Since you mentioned you are looping through the records, do you move the record pointer when the loop completes, or do you leave it the end of file?
Here is one of the two scripts that generate the error. BTW, printing to the text file on Windows produced nothing but gobbledygook, but was able to access the server from a Mac, and save as a pdf.
**Requests**: Email Followups: Generate email Followup (Server)
#The Server Trap halts the script if it is Saturday or Sunday
Perform Script [ “Server Trap: don't send system email on Saturday or Sunday” ]
Set Error Capture [ On ]
Go to Layout [ “Project_Edit” (Project_Edit) ]
#Perform find returns the records where the followup date is today or before, and filters out various status types where followup date is
Perform Find [ Specified Find Requests: Find Records; Criteria: Project_Edit::FollowDate: “<=//”
Omit Records; Criteria: Project_Edit::status_current: “Complete”
Omit Records; Criteria: Project_Edit::status_current: “Dead”
Omit Records; Criteria: Project_Edit::status_current: “Under”
Omit Records; Criteria: Project_Edit::PSID: “==st46”
Omit Records; Criteria: Project_Edit::status_current: “=” ]
[ Restore ]
If [ Get ( LastError ) = 401 ]
Exit Script [ ]
Go to Record/Request/Page
[ First ]
#Each loop makes a Snapshot Link of the current record, exports the file to the FM Server Documents folder, Sends mail to the contact
designated in the file, attaching the corresponding Snapshot Link
Set Variable [ $link; Value:"filewin:" & Get ( DocumentsPath ) & "SunSalesDB.fpsl" ]
Save Records as Snapshot Link [ File Name: “$link”; Current record ]
Send Mail [ Send via SMTP Server; To: projedit_STAKEHOLDERS::Email; Subject: "Project Followup: " & Project_Edit::
Proj_Name; Message: Let ([cd = Get ( CurrentDate ); fd = Project_Edit::FollowDate; pn = Project_Edit::Proj_Name];
Case (fd = cd; "FOLLOWUP DUE TODAY for " & pn; fd < cd; "FOLLOWUP OVERDUE BY " & cd - fd & " DAYS for " & pn; pn
& " HAS NO FOLLOWUP DATE" ) & "¶¶CUSTOMER; " &
projedit_CUSTOMERS::Cust_and_City Full & "¶¶CONTACT: " & projedit_CONTACTS::c_Name_FNLN &
"¶¶CONTACT PHONE: " & projedit_CONTACTS::Phone & " CONTACT CELL: " & projedit_CONTACTS::Cell & "¶¶LAST
UPDATE NOTE¶" & ProjEdit_LastHistEvent::EventDate & ": " &
ProjEdit_LastHistEvent::EventInfo) & "¶¶SPECIAL NOTE: If you have access to the Filemaker Server (i.e. you are on the Sun
Server or TS or VPN), Open the attachment to this email and it will navigate you to the Project Record where you can easily
update."; Attachment: “$link”; Name: "The Filemaker Pest"; Email Address: "email@example.com"; Reply-To
Address: "firstname.lastname@example.org"; SMTP Server: "sundc1"; Port: 25; Authentication Type: Plain Password; User
Name: "sun_filemaker"; Password: "********" ]
[ No dialog ]
Go to Record/Request/Page
[ Next; Exit after last ]
Go to record/request/page [next ; exit after last ]
Will log a 101 error code when it exits the loop on the last record in found set. It does not indicate (in this case) that anything went wrong with your script.
Thanks PhilModJunk. That makes sense because both of my scripts use the [Exit after last], and as mentioned in the original post, the script worked fine.
Server-generated scripts are a far-cry from client-generated.
I'll just put a record count in a variable and step the count on another variable. When they're the same, bye-bye script.
One more interesting note. Whatever FM support I found did not list the .fpsl file as one that could even be used. Makes me wonder what other file-types will work with Server-generated scripts.
Get ( RecordNumber ) = Get (foundcount) is one test you can use to tell that you are on the last record.