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.

Clear Field for all Records

Featured Replies

I need a exit script that will clear the the checkboxes in a field for all records .... any ideas

I know it's dangerous, but Replace script function will do it for you :

Got o Layout (where the field is)

Goto field (select your field)

Replace (your field, "").

If your need is for an exit script, there are some examples here on the forum.

Replace is slightly easier to implement, but you do have to be careful to be on a certain layout, and that the field you're changing is on that layout. The alternative method, that can be used whether or not you or the field are on a layout, is with a loop:

Show all records

Go to record [first]

Loop

..Set Field [yourField, ""]

..go to record [next, exit after last]

End Loop

Note that both replace and looping can be problematic in a multi-user system: if someone else is using the record, that record will be locked and the script will fail. The usual workaround is to turn on error trapping and create a log file, then go back and deal with the errors later.

If your system is single-user, you don't have to worry about it.

One minor caveat: If the field is a Number Date or Time field, you need to SetField[yourField, TextToNum("")] -- or TextToDate or TextToTime, as the case may be.

  • 6 months later...

Another caveat. If you have field validation turned on for any fields in the db and some records fail it, it will cause the loop to hang when it tries to go to the next record...

This is why I prefer to validate by script whenever possible. Field validation can be a royal pain in the ass and screw a script up when you least expect it. If there is no choice, then I test for failed validation when Go(ing) to Field[ ] with:

Loop

Go to Field [ ]

Exit Loop If [not Status(CurrentError)]

Show Message ["Your data is jacked! Please fix it, then press Enter."]

Pause/Resume Script [ ]

End Loop

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.