IdealData Posted April 27, 2009 Posted April 27, 2009 I only just noticed that the script step Go to Record/Request?page [Next, Exit after last] produces error 101 when it goes past the last record. Error 101 is "Record is missing", which I can quite understand, however it seems odd to produce an error for a valid result as it should just 'Exit after last'
Søren Dyhr Posted April 27, 2009 Posted April 27, 2009 Yes it seems overkill, but why would it be a problem ... do you mean that it overwrites what earlier on is stored in Get(LastError) changing the logic, or is it stopping the execution of a IWP'ed script prematurely? It seems just a loose end where internal and external messaging gets mixed up, not worth doing anything about? --sd
fabriceN Posted April 27, 2009 Posted April 27, 2009 This becomes annoying when you use the Debugger in the 'Pause on Error' mode or if the script is performed by server (the error is visible in the log) Simply add Exit Loop If [ Get ( RecordNumber ) = Get ( FoundCount ) ] before the Go To Record [ Next ; Exit After Last ] A pity nothing can be done with the find steps ( Perform Find, Constrain/Extend Foundset )
Søren Dyhr Posted April 27, 2009 Posted April 27, 2009 This becomes annoying when you use the Debugger in the 'Pause on Error' mode The IWP argument I just mentioned, now you suggest a nice solution to the problem ... but another, could be to break the scripting needs up in digestible chunks of independent scripts. --sd
yaacovCR Posted August 5, 2009 Posted August 5, 2009 I'm running FileMaker Server 10 and I've noticed that I only get an error 101 for the Go to Record script step at the end of a loop if I have "Run with full access privileges" checked. Not sure why. Warm regards, Yaacov
mr_vodka Posted August 6, 2009 Posted August 6, 2009 Because it throws an error when there are no more records to go to "next"
yaacovCR Posted August 6, 2009 Posted August 6, 2009 In any case, I believe I am wrong about this. My latest testing seems to show that the server log always records a 101 error, but I can avoid getting an error reported to me via e-mail if I have an additional step, such as a Go to Layout (original) at the end of the script. I believe the access privileges thing was off-target.
mr_vodka Posted August 6, 2009 Posted August 6, 2009 Yes if there is an action that yields with no error AFTER the last go to record next of the loop, it seems to be fine. I believe if you use Exit Script [1] it should work without errors as well. Also take a look at this past thread where some of this was discussed. http://fmforums.com/forum/showtopic.php?tid/197179/
Recommended Posts
This topic is 5589 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