Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7482 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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.

This topic is 7482 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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