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.

Filter Script for dup. address help please...

Featured Replies

Scenario: I have a large found set of people I want to send a mailer to. Some have duplicate addresses, and I want to send only one mailer to a household. I sorted the set by address, so any records with duplicate addresses will be adjacent to each other. I want a script that will start on the first record and compare its address with the next record's address. If they match I want the script to mark a field "no" (they all start marked "yes"). If they do not match, I want it to move onto the next record and continue doing this to the end. Then I can ommit all the ones newly marked "no" and create the labels.

Any help would be appreciated!

-Phil

Go to Record/Request/Page [First]

Set Field [gText, Address]

Go to Record/Request/Page [Next]

Loop

If [Address = gText]

Set Field [mark, "no"]

Else

Set Field [gText, Address]

End If

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

End Loop

Another option is to create a self-relationship from Address to Address and a calculated field of serial = selfrel::serial. Then you can perform a find for 1 in this calculated field to find unique records.

  • Author

I am trying to follow your instructions but am hitting a wall.

What is gtext? I do not see that anywhere in the scripting tools.

E-mail directly if you want:

[email protected]

Thanks so much for your help!

There is another technique that you can use. You can view our method here:

http://www.fmdeveloper.com/php/tips_and_tricks.php

This one works a little quicker.

But to answer your question, gtext is a global field that you define to make that one work

That's the other method I suggested. You don't need to specify a sort order by creation date, however, as FileMaker automatically assumes the first related record is the oldest if no sort order is specified. So it's redundant.

  • Author

None of this worked for me, but thanks for your help. I am giving up and filtering out duplicates manually.

Sorry to hear that. If you attach a clone of your file, we could tweak it to show you how it works, if you like.

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.