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

Hi all! I am trying to define a calculation as a field validation and am stuck. What I want to do is disallow certain values in a field when a certain pattern exists in a related field. Specifically, I want to disallow the number 88164 in a text field(Code) when the pattern "thin" appears in a related text field(Related::Text). I tried using the following calc:

If(Code = 88164, PatternCount(Related::Text, "thin") = 0, 0)

This may sound stupid, but it worked briefly and then it stopped working. It now keeps failing validation.

Here's another twist. I actually need to validate the Code field for two values. Specifically, I want to disallow the number 88164 in the text field(Code) when the pattern "thin" appears in the related text field(Related::Text) and I want to disallow the number 88142 in the text field(Code) when the pattern "conventional" appears in the related text field(Related::Text).

Anyone know how this can be done using validation?

Wow. thats a mouthful...

Your on the right track with the validation. The only advise I have if it stops working is 2 things:

-Double check the relations. Make sure everything is in order. Somthing could be messed.

-Validations are evil buggers. Make sure you're not fooling around with the validation calc when you're in the field itself. FileMaker doesn't check until after you try and leave the field. As well, if your using a custom fail message, FileMaker shows that for ALL failed validation, ie non unique, not in value list etc.... If the message box does not have the 'Revert Field' button it is somthing else failing.

  • Author

Thanks for you response! I am in fact using a custom message, but every time it fails the "Revert Field" button is available. I am wondering if it has to do with the fact that the calculation has the field (Code) that is being validated in it. Any thoughts?

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.