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.

Featured Replies

In our systems we will often use scripts to trap for incorrect or missing data. Around the office we call these 'loop catches' because we use a loop to trap for the problem. They usually look like this:

Loop

If[isEmpty(VariableData)]

Show Custom Dialog ["Variable Data"; "Variable Data must be specified."]

Go to Field[VariableData]

Pause/Resume Script[indefinitely]

End If

Exit Loop If[not IsEmpty(VariableData)]

End Loop

I'm wonder in folks have a more efficient way of doing this. For technical reasons we do need to do these operations in a script, but I bet there other (perhaps better) ways to do this.

That looks about right. However if there is a business requirement for the field to contain a value then field level validation can/should also be used. This will manifest itself as an inability for the record to be committed if it fails validation.

I use some field validation, and the loop catch for "modal" data entry into global fields.

Now that FileMaker 11 gives us the OnObjectValidate trigger, you don't need the loop. Although in this case, OnObjectExit might be a better choice, since if the field starts out blank, and you don't change it, OOV won't trigger whereas OOE will.

If[ IsEmpty( Get ( ActiveFieldContents ) )]

. Show Custom Dialog["Ouch!"]

End If

To keep the user in the field, be sure to put this step at the end:

Exit Script[False]

See this article (be sure to read the comments too):

http://sixfriedrice.com/wp/the-onobjectvalidate-trigger/

Create an account or sign in to comment

Important Information

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

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.