Skip 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.

Unique dual key index?

Featured Replies

What's the best way to implement a unique dual key index (SQL terms) in FMPro?

For example, a company_contact table: with 2 key fields: CompanyID and ContactID

CompanyID ContactID

-------------------

COMP-001 CONT-001

COMP-001 CONT-002

COMP-001 CONT-002 not allowed (duuplicate)

COMP-002 CONT-001

COMP-002 CONT-004

COMP-003 CONT-005

COMP-004 CONT-002

etc.

- Jansen

  • Newbies

Create a new field of type text. This field will serve as the unique key.

Add a field calculation of something like CompanyID & "|" & ContactID.

Uncheck the "Do not replace existing value for field" option.

Check the "Prohibit modification of value during date entry" option.

Check the "Not Empty" and "Unique Value" validation options.

  • Author

RobertTaylor66,

One of us must be mixed up.

How do you access the following options you mentioned for a "Calculation" type field?

1. "Do not replace existing value for field"

2. "Prohibit modification of value during date entry"

3. "Not Empty"

4. "Unique Value"

  • Newbies

Please re-read my post.

You do NOT want a calculation field.

You want a Text field with a calculation (defined on the Auto-Enter tab of the field options dialog).

The goal is to create a third field that will automatically be the concatenation of the two other fields. This third field will will enforce the uniqueness for your design.

  • Author

This works great!

Thanks

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.