Newbies jeremy rey Posted April 17, 2009 Newbies Posted April 17, 2009 (edited) I'm running FileMaker Server 10. I have about 4 FM Scripts which are triggered from the server at night. Most of them are fairly simple scripts with a find, few set fields, an IF statement or two, and a loop that works its way through a found set of records. It's not doing any imports or anything fancy. 3 of the scripts when run from FM Server show a "FileMaker Script Error" in the Status column. However, when I go back and see if the script did its magic, it did so I have been ignoring the errors. The most recent script that I put up there is not all that different from previous scripts. There is a find and set field. Just about the only thing different is that there are some nested IFs and the contents of the IF statements are slightly long. Otherwise, it's the same old set field and things like that. However, this time around, I not only show the error "FileMaker Script Error" but the script doesn't seem to execute at all. I've tried putting a set field very high up in the script to see if it's executing an early part of the script and runs into trouble further down but none of it seems to get executed. question 1: How do I write it so that I won't get the error showing on any of my 4 scripts? question 2: Why would this script #4 not execute when it is not that different than previous scripts I have written? Here is the script. I had to run it through a text editor to post it here so some of the spaces might be a tad messed up. Set Error Capture[On] Enter Find Mode[] Set Field[ARFilingLog::Deadline Display;"="] PerformFind[] If[Get(LastError)=0] GotoRecord/Request/Page[First] LoopIf[ARFilingLog::Locked Deadline Date <> ARFilingLog::Deadline Display and ARFilingLog::Locked Deadline Date <> ""] Set Field[ARFilingLog::DeadlineDisplay;ARFilingLog::Locked Deadline Date] ElseIf[ARFilingLog::DeadlineDisplay <> Date(Month(OrdersFromARFilingLog::Deadline);Day(OrdersFromARFilingLog::Deadline);ARFilingLog::Year)andARFilingLog::Locked Deadline Date="" and PatternCount(ARFilingLog::Filing Status;"Filed") < 1 and IsValid(OrdersFromARFilingLog::Deadline) and OrdersFromARFilingLog::Deadline <> ""] Set Field[ARFilingLog::DeadlineDisplay;Date(Month(OrdersFromARFilingLog::Deadline);Day(OrdersFromARFilingLog::Deadline);ARFilingLog::Year)] End If End If GotoRecord/Request/Page[Next;Exitafterlast] End Loop End If Edited April 17, 2009 by Guest
IdealData Posted April 17, 2009 Posted April 17, 2009 Q1: The server implementation of scripting does not support all the script steps. These may not be critical to the script operation however. Q2: Post the script. To see the script steps supported on FMServer, open the script and set the "Show Compatibility" to 'Server'. Script steps not supported are then greyed out. You can get FMServer to ignore incompatible steps by using an Allow User Abort [Off] at the start of the script. For more of a clue look at the IWP publishing guide in the installed documentation PDF files. (sadly the Help system does not document FMServer scripting)
Recommended Posts
This topic is 6052 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