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.

deleting empty record script

Featured Replies

Hi all,

I am trying to run a script that will run automatically when I close the database. I want the script to delete all records that are empty. ihave succeeded in creating such a script by searching for blank entries in "last name" field. Then I followed that up with a "delete records" command specifying all records found. This works unless there are no blank entries in "last name" field in which case I get error message and "continue script?" option. I would like to set a condition whereby if find request returns 0 results, the script is terminated and no error message is displayed.

Any help would be appreciated!

Thank ou,

Yalon

Add this step to the beginning of your script:

Set Error Capture[On]

Then after the Perform Find step, add

If[Get(LastError) = 0]

Delete All Records

End If

  • Author

Thank you David. That suggestions works perfectly. No more error messages.

I have a new problem however that you might be able to help me with. I am creating a patient management database for the hospital department I work in.

i am wondering if there is a way to trigger a message ONLY when data is being MODIFIED. Original entries into fields should not trigger this script. The message will read "are you sure you want to modify entry" to create an extra layer of protection.

i have succeeded with the following script:

If [Not IsEmpty (field name)

Show custom dialog ["";"you are attempting to modify data"]

End If

Go to Field (field name)

It works but the problem is that I have over 50 fields and i need to create 1 script for each field since field name changes.

Is there a solution to this problem ?

Thanks and sorry for the long post

Yalon

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.