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.

Validate field based on value of another field?

Featured Replies

How can I validate the contents of a field based on the contents of another field? I tried (in validate by calculation):

If( field1 = "yes", field2 <> "yes", "")

but it didn't work. And then I thought, what exactly is the difference between putting a calc in the validate by calc area rather than just making the field a calc field? And then I remembered that I have other info I want to keep in that field and that I just want to make sure that both fields cannot = "yes" at the same time.

What am I doing wrong?

TIA,

KC

And then I remembered that I have other info I want to keep in that field and that I just want to make sure that both fields cannot = "yes" at the same time.

Why not make a third field that does just that? It would be you validator field, which is of course a calc field (no way around that I think).

You cannot have a calc field, and enter (manually) data into it at the same time. Its contents are either the result of a calc, or not.

You could also create a triad of fields, one being the calc field (A), one the manual field (:, and the finally one which is the master field ©, which is really just a calc field that says to use use (A) unless (: is not empty, in which case you use (: instead. You can even lay the (: transparently on top of © so it looks like one field, always returning the calc value of (A) unless you type in it -- in which case it would returned the manually entered value of (: in © instead. Then again, I'm just rambling on now, and the triad may not be a good idea at all in this case. smile.gif

You could also utilize relationships to validate certain variables, but you'd need extra fields there too to set it up.

HTH

  • 2 weeks later...
  • Author

Good idea. I think I'll give it a go. Thanjks!

If the purpose of your validation is to make sure that both fields cannot be yes at the same time, then the validation for both fields would be:

Field1 <> "Yes" or Field2 <>"Yes"

With an appropriate message for each field warning the user.

There is no need for the "If" statement in a field validation.

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.