Peter Payne Posted November 15, 2008 Posted November 15, 2008 One of the weirder thing of switching from Filemaker 6 to FM8/9 was how fields refused to yield the status of being currently selected. Hence, all kinds of scripts I had would break because the users were still selecting the current value, hence it wasn't "accepted" by the system yet. I did all kinds of things like go to the previous record and back again to simulating clicking out of any field, but is there any better way of doing this? I tried Flush to disk and that didn't do anything meaningful. Any help would be appreciated.
bcooney Posted November 15, 2008 Posted November 15, 2008 Sounds like you're looking for the Commit Record script step.
Peter Payne Posted November 16, 2008 Author Posted November 16, 2008 Thanks. That's good, but the issue is that Filemaker thinks I'm still clicked into that field, actively using it, and as a result, a script in another database (another file) can give "that data is in use" errors. I tried switching from my find all records/go previous/go next silly steps to commit record and the error came back. What we need is a "deselect all" command as exists in Photoshop. I presume there's nothing like this?
Fenton Posted November 16, 2008 Posted November 16, 2008 (edited) Commit Record works; you must not be using it correctly. You have to commit records before you leave the context where the record is open. [P.S. I moved the topic from the special "Server" forum to this Scriptmaker one, as it seems a script question.] Edited November 16, 2008 by Guest
Vaughan Posted November 16, 2008 Posted November 16, 2008 Thanks. That's good, but the issue is that Filemaker thinks I'm still clicked into that field, actively using it, and as a result, a script in another database (another file) can give "that data is in use" errors... This is *exactly* how FileMaker Pro is supposed to work. BTW if FMP "thinks" you're clicked in a field actively using the record, then you are. Somewhere in some window the record is open. As developer make sure that you close every record after you've used it. (Or, deliberately leave it open to prevent other users from changing it underneath you; it works both ways.)
Peter Payne Posted November 18, 2008 Author Posted November 18, 2008 Is there a command to close the record? I'm not seeing this. Basically, in FM6, switching to the Invoices database (er, window, now) de-selected what the user was doing in the last window he was in. So, is there a way to say, de-select the highlighted info? All the things I've tried, including commit record, still kept the "text is selected and the record is in use" status, which broke a lot of my scripts at first. The only way I could find to solve it was to go to the previous, then the next, record in scripts, which seems inelegant.
Vaughan Posted November 18, 2008 Posted November 18, 2008 Commit Record/Request [ no dialog ] BTW the Commit script has to be invoked on the layout (and same window) that contains the open record. It does not commit all records in a windows, or anything like that. So if there were 3 windows with open records, running a script that invoked the Commit Record/Request script step will only close the record that's open in the window that the script runs in. Keep trying, it'll come.
comment Posted November 18, 2008 Posted November 18, 2008 Just an added note: Selection and opening records are two separate issues. Clicking into a field does NOT open a record (that happens only when you start editing the data), and deselecting a field does not necessarily commit a record. You can "deselect all" simply by calling Go to Field[] with no field specified - but if the record is locked, it will remain so until committed. Commit Records[] does both. You'd be well advised to read the “Record Ownership” chapter in Filemaker's 'Migration Foundations and Methodologies' white paper.
Peter Payne Posted November 18, 2008 Author Posted November 18, 2008 Excellent, thanks for the tip! That's great!
Recommended Posts
This topic is 5850 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