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.

Prevent Blank Records

Featured Replies

Hey guys,

 

I have a layout that I want to be used like a data entry form as in Access.

Each time I go in and close the layout it saves a record.

 

I have tried adding the fields as required fields but the annoying thing was if I don't use tab and just click out of the current field it has a cry and says x field is blank. It seems fairly sensitive. Maybe I have done it wrong.

 

Any suggestions?

Cheers

Solved by Wim Decorte

Go to solution

Every time you click outside of a field (on the background of the layout), or when you leave a layout, FileMaker commits the records.  Field validation gets triggered just before that commit which is why you are seeing the message.

 

So it all starts with understanding when FileMaker does a commit.

 

Also keep in mind that field-level validations will kick in everywhere the field is used, not just on that layout.

 

You could use the OnExit event on each field to check if the field is empty before you let the user out.  That keeps the logic limited to the data entry screen.

  • Author

That is awesome mate and makes perfect sense. It being required not just on that layout is not what I want.

 

With the OnExit event what would an example code be for example so it can check each field?

It being required not just on that layout is not what I want.

 

Are you sure about this? I get the impression (mostly from your other threads) that you may not be aware enough of the difference between a layout and a table. The same table can have many layouts. In addition, a field of one table can be placed on a layout of another, related table - for example, when you want to create child records inside a portal located on the layout of the parent table.

 

If a field is required to have value on a specific layout only, it means that the same field is allowed to be empty when modified through any other layout.

  • Solution

That is awesome mate and makes perfect sense. It being required not just on that layout is not what I want.

 

With the OnExit event what would an example code be for example so it can check each field?

 

Since the OnExit is linked to an individual field you do not have to check if *all* fields are empty, just that the one the user is leaving is empty.

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.