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

I am trying to validate the uniqueness of 2 fields entered into a client database. For example the 2 fields are First Name and Surname.

The next time I create a new record I want the database to use the validation option to check if the combination of these 2 fields is unique and give a warning. I don

You really want to validate a calculation field (=firstname & surname) but FMP does not natively do this. However there is a TechInfo article describing such a technique.

Go to the TechInfo database on the FileMaker Inc web site (probably under support) and search for "validating a calculation field" or something similar.

quote:

Originally posted by Vaughan:

You really want to validate a calculation field (=firstname & surname) but FMP does not natively do this. However there is a TechInfo article describing such a technique.

Go to the TechInfo database on the FileMaker Inc web site (probably under support) and search for "validating a calculation field" or something similar.

I didn't check if such article exists but here's what I've done:

Create an calc field with result text:

code:


unique=name & Length(name)&surname & Length(surname)

make it indexed and check the option "Do not evaluate if all referenced fields are empty"

and make sure that you've selected "not empty" the validation for name and surname.

Than make an self-relation Validator::unique->unique.

Define field "status" as text and autoenter look-up from field unique from self relation Validator with option "don't copy if no match" checked.

Create validation by calculation for this field as:

status!= unique

and uncheck option "validate only if field has been modified"

In the validation panel check strict and custom message

Now. put those fields on your layout.

Put the field status behind name or surname and uncheck " allow field entry" and make the the text color same as background(or make the background color of overlaying field to some color).

Ommit status field from tab order for this layout:

you have to have fisically field "status" on your layout or yoy'll end up with an non overriding message from FM.

HTH

Dj

[ April 08, 2002, 04:55 AM: Message edited by: dj ]

I've just checked FM site and yes there are few TECHINFO on this topic.

Here's one that more or less I've implemented

validate calc field

Dj

[ April 08, 2002, 05:05 AM: Message edited by: dj ]

  • Author

Thank you very much for your help, I looked up the Tech info CD and there it was.

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.