The Original FileMaker Community
Business Templates - Demo Apps - Video Tutorials -Samples - Help - 46000 Member Forum

The Leading Filemaker Developer Tools

The FileMaker Get(OpenRecordState) and Get(RecordOpenCount) Functions – FileMaker Today


0 – if the record is closed


1 – if this is a newly created record and the current user is still adding the first round of data to it


2 – if this is a previously created record and the current user is currently modifying the data within that record or they simply have their cursor in one of its fields.


This function is not network aware, it will not tell you if another user has a record opened or not.


The FileMaker Get(OpenRecordState) and Get(RecordOpenCount) Functions


The Get(RecordOpenCount) Function

The Get(RecordOpenCount) function will return a count of the number of open / uncommitted records in the current found set.


Personally, I had troubles getting this function to work for me but I eventually did. I had tried using an unstored calculation field on the layout but that would not work. I tried multiple open windows with unsaved changes. That did not work as well, which bummed me out because I thought this would be a good way to see if multiple unstored record windows could be tracked. So, this function is dependent upon the current foremost open window.


I resorted to using the Data Viewer (a FileMaker Advanced feature). Then I started to get some results. I would modify one record in a portal and the counter would jump to 2. This includes the parent record and the portal record. I updated another portal record and the counter in the Data Viewer went to 3. This means the other portal record change is still open. I worked my way through 5 portal records and the sequence remained true.


Then I did the revert command, the counter quickly went to zero and the changes in my portal records reverted as well.

=

More info about the author and FileMaker in general, contact me at This email address is being protected from spambots. You need JavaScript enabled to view it..


© 2008 – Dwayne Wright – dwaynewright.com


The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.


© 2010 – Dwayne Wright – dwaynewright.com

The material on this document is offered AS IS. FileMaker Pro is the registered trademark of FileMaker Inc.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More