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

Avoid duplicates...

Featured Replies

This question is based on a topic explaining Many2Many relationships in FM7 described in the book "Special edition using FMPro 7". Unfortunately the book does not explain a problem that I am having. Could someone help?

As told in the book,

I created a layout as shown in the picture based on the table occurence (TO) "Shift" and then inserted a portal based on the fields in "ShiftAssignment". Then Formatted the first field of the portal to display a value list generated from theTO "PatrolOfficer".

Everything works fine except that I am able to enter duplicate values into the portal. How can I avoid this?

Is it possible to populate the value list dynamically based on the selection the user has already made that the user cannot make 2 duplicate records?

Is there a function in filemaker that can return the total number of records from a table. I was wondering if I can then somehow make FM to iterate through each record of for eg. "ShiftAssignment TO" to see if the concatenated value of "ShiftID & PatrolOfficerID" is a unique value for the particular table.

M2M.gif

You need to set up the VALIDATION on the fields in the related table.

This will also ensure that your concatenated entries are also unique.

To count the records in a table see the Get (TotalRecordCount) function. See the help system for more details.

Everything works fine except that I am able to enter duplicate values into the portal. How can I avoid this?

I would probaly not validate, but instead use a principle like the attached, and if I could get rid of the join table as well would do it ...but if you need to build reports on the join records should they stay as in the template.

--sd

pling.zip

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.