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

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

Recommended Posts

  • Newbies
Posted

I have only been working with FileMaker for a couple of months now, and it seems pretty daunting.

 

The most pressing issue that I need help with is finding the duplicates in my contacts database.

 

I've followed the instructions found here: http://help.filemaker.com/app/answers/detail/a_id/3441

And here is my script:

Duplicates%20Script.png

 

My "UniqueID" field uses the contact's last name and email address to calculate a unique id.

I followed the instructions exactly... slowly figuring out how to accomplish each step. I am fairly confident that every step is correct except for "If [$id = Scratch::UniqueID]" because I didn't know how to enter the variable into the calculation. I just typed it in... which I don't think is correct. Also, on my computer (in the picture) the $ sign looks more like an S, but on another computer it looks as it should.

 

Thank you for any time and advice you're able to give!

Posted (edited)

I can't see anything outright wrong in your script. Did you run into something that would suggest it's not working as expected?

 

Umm, the first step in the loop, Set Variable [ $id ; ... ]  should come before Loop.

 

 

Note that the script could be made more efficient by finding records with duplicate values first, e.g.

 

Enter Find Mode[]

Set Field [ Scratch::UniqueID ; "!" ]

Perform Find[]

 

instead of looping over all records in the table.

Edited by comment
  • Like 1
  • Newbies
Posted

Thank you for your prompt response! I guess it probably would have been helpful if I showed the results of the script... 

 

Unfortunately, running the script produces the same results whether the Set Variable [$id; Value ...] is before or after Loop.

 

There are strange problems with the results as well.

 

A partial screenshot:

DuplicateScriptResults.png

 

 

As you can see, the UniqueID field seems to be working correctly. The script not so much.

 

First, shouldn't the script result in a list of only records marked as duplicates (an "X" in the Duplicate field)?

 

Second, why are some records marked as duplicates when they're obviously not?

 

 

I would definitely like to try your more efficient version of the script, would your three steps simply replace all actions between Loop and End Loop? And should it look exactly as you've typed?

 

 

I so appreciate your help.

Posted

Your screen shot shows a partial found set but your script should be showing all records.  That Perform Find [ Restore ] ... can you tell us what is in it?  It should be an X without quotes.  I wonder if it is working but your found set makes it look like it isn't because you aren't getting all the records to compare.

 

Can you show all records, sort by the uniqueID and then look at the duplicate field? 

  • 4 months later...
  • Newbies
Posted

Thanks for taking the time to try and figure this out.

 

In the end I just deiced to create a "UniqueID" field that combined the contacts' first and last names, then used FileMaker's native duplicate search.

 

Not totally ideal, but I think the end result is actually the same as the script would have been (if it had worked).

This topic is 3872 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.