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.

need to check uniqueness based on 2 or more field

Featured Replies

This one is frustrating me.

I need to automatically validate records for uniqueness but not based on 1 field but 3 or more.

For example, I have a customer field, a plot field, and a location field.

Each field can have any value but if all 3 values together can only be in the database once.

What am I going on about?

Example entrys

Customer Location Plot

Mr A john st london 2

Mr A john st london 3

Mr B paul st london 3

Mr B mark st london 3

The reason I need this is that I can input many many records, and its easy to double input records, but I can't have them, ideally a validation message would pop up and say that this cust/plot/location is already in the database

I thought the solution would be by creating a calculation field ie validation=customer&location&plot

But you can't use the unique validation on a calculation field, I've tried using autoenter fields but I can't get any to work

Any help would be greatly appreciated.

Cheers

I had the same problem a few months ago and Danjacoby gave me the following tip. It works...

"Create a self-relationship, based on the calc field. Next, create a calc field (call it "one") that returns the number 1. Finally, create a calc field that returns a warning if the sum of the related "one" field is greater than 1."

In order to help the person entering the information the calc field is...

if (sum related "one">1,"DUPE","")I then put a very large field on the layout which is transparent I made the typeface HUGE so that it covered the screen with the word DUPE. Only a dope could miss it.

This is a good suggestion.

However, the validation technique actively *prevents* the user from entering in data that will result in a non-unique calculated value.

As I recall, Chuck posted a method of validating uniqueness on several fields in the development standards forum. It may be the same thing that is in the FMI tech article, but you may want to check it out.

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.