Jump to content
Sign in to follow this  
IdealData

Goto Next Record gives Error 101

Recommended Posts

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'

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 )

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Because it throws an error when there are no more records to go to "next"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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