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.

Single Table Self-Join to Compare Single Record with All Others

Featured Replies

I don't understand why this is so complicated. I have a table of images. I want to show one image and compare it to all the other images in the table to be sure it's not a duplicate. So when I have the record I want to compare, I set the serial ID of that record into a global field and then create a container that should show only images where the global field matches the serial ID. Apparently I'm missing something. Your help would be greatly appreciated.

Compare Photos Within Single Table.fmp12

2 hours ago, Ziphius said:

Apparently I'm missing something.

The global field must be on "this" side of the relationship - change it to:

rg.png.b4532574666cf74fc74b96855825e9ee.png

Note:

1. You don't need a variable to set the global field - and you certainly don't need a global variable that hangs around until the end of the session.

2. The above relationship will show not only duplicates of the selected record,  but also itself. I am not sure how you got to have duplicates in the primary key. Most often a relationship to detect duplicates will look something like:

Items::SomeField = Items 2::SomeField
AND
Items::ItemID ≠ Items 2::ItemID

to show duplicate values in SomeField, but exclude the current record.

3. You should use a portal, in case there is more than one duplicate.

4. You can also find duplicates by entering ! into the field in Find mode.

 

Edited by comment

  • Author

Thank you, that did it. It wasn't a matter of looking for duplicate primary keys, it was to have someone compare the patterns on the manta ray belly with the rest of the catalog to make sure it is a unique pattern and not just a different photo of the same manta ray. I also removed the variable since it was an unnecessary step, as you pointed out.

I also added a "Status" variable that can be changed from "Pending" to "Matched", that way when the user has completed matching a photo to the catalog, they can flag it as matched and move onto the next but the next photo only needs to be matched to the "Pending" photos.

Basically if someone provides me with a photo they have taken of a manta ray, I would add it to the catalog but it would need to be compared with all the others to be sure its a unique animal and not a resight of an existing animal. If a match is found, that photo would just be nested in a new table (not created yet) as a resight with a date.

Compare Photos Within Single Table 2.fmp12

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.