Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Revert Record won't delete the record when Save Changes is set?

Featured Replies

In FM13, if you create a new record, but never commit it, then calling "Revert Record"  will delete the record entirely.

 

In FM13 it's also possible to set up a Script trigger for OnRecordCommit to block the auto-commit when the layout has "Save record changes automatically" checked by calling a script that returns a zero result.

 

However, it seems that calling Revert record in such a scenario does NOT delete the record, even if the OnRecordCommit script returned zero.

 

Is there any way around this?  I really like the feature where Reverting a record auto-deletes it...

 

 

That behaviour has been around for 10+ years now, it is not new to FM13 and there are no surprises...

 

My guess is that you have something going that actually does commit the record before you call the revert.

 

Can you post a bit more detail about the scripts that you have set up?

  • Author

Upon further testing, this may be a WebDirect related issue.

The Layout

Save record changes automatically = true

OnRecordCommit calls a script which returns zero

The Test:

Navigate to this layout

call a script that makes a New Record

call a script that calls Revert Record

Inside FileMaker Pro:

When RevertRecord is chosen, the record is deleted.

From WebDirect:

When RevertRecord is chosen, the record is NOT deleted.

  • Author

Hmm - the plot thickens:   I have a  different Table which behaves more like I expect it to:  In this table, if a new record is created in WebDirect, it doesn't show up in the FileMaker pro side until it's actually committed, and if you Revert the record before committing, it's deleted.

 

The Table that is not working as I expect uses Custom Record Permissions ; the one that works normally does not.    I'll see if I can narrow it down.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.