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.

Auto-Delete Record Based on Field Value

Featured Replies

I am developing a database where I will be importing virtually thousands of records from an excel spread sheed sheet on a daily basis.

The core data (because of the automated system it is pulled from) will sometimes have erroneous information that I would like filtered out of FMP database.

Is there a script I can write that will filter through all records and then "auto delete a record" if a value in a field is Greater than "X"

If so, is this something that I can run automatically after/or during the data import, or is the only way to "click" a button to activate a looping script after the import is complete?

Oh...And as long as I am asking for the sky....Is there a way to get a couont of the records that have been deleted because they didn't pass the test?

Thanks in advance for any help.

Steve

Why dont you just have a button that does the import as well as the cleanup as well?

After your import,

1. Set a global field to the total number of records.

2. For the delete, just run a simple loop script that check if that field is greter than X. If it is delete.

3. At the end, subtract the remaining records from your global field that you set previously.

All of this can be scripted in one shot.

  • Author

Well, I knew I could script it after the fact, what I was wondering if it could be done as the time import is taking place.

It's not really a big deal to click a button after import to clean things up, but it would be more "elegant" to not have to.

Sometimes when you have to explain these types of things to "bosses" they just don't understand why it's not right on the git go.

I am just trying to develop this DB so it has as little user interface as possible to make the boss happy. Personally, I am on your side.

SF

But you dont have to use a button afterwards. You can just run it when the import script is done.

Or is the user using the FileMaker Menu for the import? If so, just create an import button that does the whole process. One click.

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.