AnsweredAssumed Answered

Useful hacks- practical or irresponsible?

Question asked by smith7180 on Feb 17, 2018
Latest reply on Feb 23, 2018 by fmpdude


Finding duplicates within a found set has always been a pain.  The duplicate wildcard "!" does not work with "Constrain found set".  I stumbled across this gem today which no doubt many of you are likely already familiar with: Successfully Find Duplicate Values Within A Set Of Records | FileMakerHacks

 

tl:dr the "!" wildcard works with constrain found set if the field searched has the index disabled.

 

So if I want to find all contacts with the same First AND Last name, I can make two new fields - First_no_index and Last_no_index where First_no_index is a stored calc equal to "First" with the index disabled (and same deal with Last). 

 

Now I can find all contacts that have duplicate First-Last name combos by first, for speed sake, searching with "!" in the indexed First and Last name fields, and then constraining that found set with ! in  First_no_index and Last_no_index.

 

This works very well for me. For my purposes the additional fields are fine, and the simplicity is welcome.

 

The problem is that I would like to use it in scripts that actually do things to the duplicates.  Let assume the most severe scenario which is that this involves scripts that may delete records (like removing duplicates).

 

I'm curious if developers in the community consider undocumented "hacks" like this safe/proper to use?  Obviously I keep track of such techniques and test the extensively with new patches/versions, but nevertheless I'm concerned such an approach is irresponsible.  Thoughts?

Outcomes