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.

omit all but one duplicate record

Featured Replies

  • Newbies

I have a DB with invoice file related to client file. When making monthly statements, each client will have multiple invoices per monthly statement. I want to print mailing labels from the found set of statements, but need to eliminate all but one duplicate client name & address fields (FROM EACH INVOICE). Each client has a unique client ID. WHEN WRITING A SCRIPT TO DO THIS THE Omit function in find function eliminates ALL. I need to retain one to print a mailing label.

Have a read of http://www.filemaker.com/help/Non-TOC%20Topics3.html

It should do the trick.

cheers :

  • 1 year later...

Hi Kiwi,

I just clicked on the link you provided and it no longer seems to be connected. Do you know where else I can find this info?

Thanks in advance.

Hipsig

  • 2 years later...

Try this as an outline of an approach. In your case I do not think you wish to delete records - at the end of the script add a show omitted only command (and don't do the manual delete they discuss).

Finding Duplicate Records in FileMaker Pro

Dean -- thanks for posting that link. I'm still shaky with scripting, and especially looping skills and have a question about the loop in that solution:

Show All Records

Sort Records [Restore, No Dialog] Sort by Client ID in Ascending order

Go to Record/Request/Page [First]

Replace Field Contents [No dialog, 'Mark', " "]

Loop

Set Field['Global','ClientID']

Go to Record/Request/Page [Next, Exit after last]

If ['Global = ClientID']

Set Field ['Mark', '"X"']

Else

Set Field ['Global','ClientID']

End If

End Loop

Perform Find [Restore] Find records when Mark = X

Isn't the step I've placed in bold needlessly duplicated in this loop? it seems to me that the Global Field is set to the ClientID at the end of the loop sequence, and then again at the beginning of the loop sequence. I don't suppose it makes a difference, but I'm wondering whether the Loop wouldn't work fine if you just removed that second Set Field line -- or, what's more natural to my eyes, put the fit=rst one *before* the Loop begins, and leave the second one where it is?

It's maybe a petty question, but sometimes asking a question like this really helps me discover I'm not "getting" in Filemaker.

You do need both "Set Global" steps but the first one should go above the Loop.

I'd script it a little differently, but rather than go there, I'm going to question your premise. Why not use a layout with a sub-summary part (by statement) that has the address fields on it?

I'd script it a little differently, but rather than go there, I'm going to question your premise. Why not use a layout with a sub-summary part (by statement) that has the address fields on it?

THanks for the reply, Fitch -- I wasn't the original poster, just happened on the thread and like to read things that address topics I'm working toward competence on. Based on your reply I think I'm understanding that scrip[t ok.

Once again I'm roped into answering a 3-year old thread. Glad it helped you, at least.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.