Jump to content

Crazy Values for Get (RecordNumber)


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

Recommended Posts

A simple but baffling script bug in FM 8 Advanced:

In a found set, Data Viewer reports that the last record is Record 1, and the first 3 records are all Record 0. That doesn’t make sense in any universe.

This is the sequence of single-step scripts I execute, and what Data Viewer displays.

Go to Record/Request/Page [Last]

Data Viewer shows Get(RecordNumber) = 1

Go to Record/Request/Page [First]

Data Viewer shows Get(RecordNumber) = 0

Go to Record/Request/Page [Next]

Data Viewer shows Get(RecordNumber) = 0

Go to Record/Request/Page [Next]

Data Viewer shows Get(RecordNumber) = 0

That’s right. Data Viewer says the first record in the found set is Record 0, and the next records in the set also are Record 0. (By the way, each time I execute a script or a script step, I click on Refresh Values, so it’s not an update problem.)

Have I found a bug? A corrupted file?

Link to comment
Share on other sites

A calculation field with Get(RecordNumber) must be UNSTORED.

But there is no field involved at all. I merely add Get (RecordNumber) to the Data Viewer and monitor its value as I step through the records.

That's what's puzzling. It's just the pure value being reported each time by Data Viewer.

Link to comment
Share on other sites

Update: I deleted Get(RecordNumber) from the Data Viewer list, then immediately re-added it. Data Viewer began reporting the record number correctly once again. About an hour later, it started reporting incorrectly. Sounds like a memory leak or something. I'm going to report it to FileMaker.

Thanks for taking the time, though.

Link to comment
Share on other sites

This topic is 5730 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
 Share

×
×
  • Create New...

Important Information

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