Skip 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.

Run a script just before a record is deleted?

Featured Replies

You can't change the way the menu items work. You can, however, setup a password level for the user which does not allow deletion of records (a script still can).

-bd

I can't seem to get it to work, could you give an example of how to set up the password group and the button script step that allows the user to delete the record? Thanks!

I have a "Record History" Field that records key events that happen in my research group's scientific DB. I want one of those key events to be when the record is deleted. I'm working on a script that programs the "Record History" Field to record some stuff, then export the record to a "Deleted Records DB", then delete the record.

It works fine with a button, but I want to know if it's possible to run the script when either "delete record" or "delete all records" is selected from the menu, or when (ctrl+E) is pressed...

Or if that isn't possible, to somehow inactivate those menu options, and the hot key. Thanks!

laugh.gif" border="0

Here is a generic example:

First create users (File>Access Priveliges>Password)

You'll need at least two different passwords, one administrator, one for a basic user. There may be different levels of users, but in this case, just the two.

In the Define Password dialog box, type in a master password and click create. Do not leave it blank, otherwise the the "no password" will allow full access to anyone. For the second password (in this example) create a blank password. To do this, clear any text in the password field, then from the right, in the Available Menu Commands select NONE. (We are not going into the design or file/record editing issues)

This will disable the "Ctrl+E", "CTRL+Shift+E", "Command + E" and "Command+Shift+E" for the users that use the "no password"

Now, using the "delete button" that you created on your layout, you can attribute a script that runs steps prior to deleting the record.

This can get a little tough dealing with individual passwords for many users. If the users of the DB fall in the same access level, you could use the "Use default password" feature found in the document preferences located at Edit>Preferences>Document. In the field, select the password that you want the majority of your users to use. To bypass this, hold your shift key or Option Key (Mac) while opening the file. This will prompt you to manually enter a password. This will give you the ability to enter your administrator password to make modifications.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.