Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Please Help!

I've tried many options and can't find a work around. My desire is to emulate a web site in the need to press a "save" button or "submit" button to commit the record. If the "cancel" button is pressed the record is reverted to when it was opened (or in the case that it was a new record, it is deleted.

[color:red]Try #1: I created an alternate table with the same fields and then when the user presses save a script imports the information to the real table. I did this instead of creating duplicate global fields in the same table, because it was confusing to deal with so many tables. In both cases it is cumbersome because if I add or take away a field, I have to add or take away the global field or the alternate table (not to mention fixing the import script).

[color:red]Try #2: I recently began trying script triggers. I placed on on the layout itself in the onrecordcommit spot and each field in the onobjectvalidate spot. I haven't found a script that would keep the record from validating (I'm able to see changes in a modification timestamp field when I click out of a field).

[color:red]Again, my whole goal is to trap or stop filemaker when it tries to commit a record (if a user does anything or clicks anywhere other than the "cancel" or "save" buttons).

Any help would be appreciated. The reason I am trying to do this is it is a database for a healthcare company and we need to keep track of whenever a record is changed. I want to do that by having a user click "save" or "cancel". The changes will be saved or reverted/deleted.

Thanks guys!

Posted

There are several techniques for this. One way is to do all edits in a popup window.

1. User clicks Edit and script begins. All original values are set to $origValues.

2. User is taken to popup window and paused. Two buttons are available, Cancel and Save.

3. User edits any and all fields.

4. User clicks Save. Window closes. FM will automatically commit. You could at this point have your script compare $origValue to the new value and write an audit record if they are not the same, "Name was changed from $origValue to fieldvalue."

5. User clicks Cancel. Script warns user and sets all fields to the $origValue, and popup closes.

Posted

Thank you for another idea! I think I might have to end up going with the popup window idea. You said that there are several ways I can accomplish what I am looking for.

I was wondering if there is an option that doesn't involve a popup window. Half of my users will be on Windows computers and with popup windows in Windows you get the annoying resizing of the windows in the application window. Because of that annoyance I try to stay clear of pop up windows.

Thanks for the help!

Posted

The annoying resize occurs if the user maximizes. I just have scripts Adjust Resize to Fit at the end of any navigation.

You could have an edit go to a full screen window, not a popup.

Posted

This particular layout/table is an assessment for for healthcare needs. It contains about 60 - 80 fields. Would I need to do a variable for each of them and have the "save" button verify all of them, or "cancel" as the case may be. Is there any way to stop a record before it is committed?

This topic is 5340 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
×
×
  • Create New...

Important Information

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