Friday, October 26, 2007

FILEMAKER: The Constrain Found Set Script Step

From Dwayne Wright - www.dwaynewright.com

The action of a constrained find is like a find within a found set. It is a way to narrow down your search results, after you have already performed a successful search.

In a script, it can be useful when you are doing a multiple criteria search that includes both indexed fields and unindexed fields. This is because you can do your first search on the indexed fields (very fast). Then you can do a constrained find on the unindexed fields (very slow). Since the slow search is only looking at a subset of the overall data, it can perform the search much faster.

In the script step, has the one option of using a hard coded search string or not. This is standard fair in all the search related script steps.

I’m not sure if it’s absolutely necessary but I’m a bit of a commit script step faithful user. When I do something in a script that might be dependent on something done earlier in the script, I sprinkle a commit script step in there. I would do this in the above situation as well. After performing the first search, I would do a commit. Then I would perform my constrain find.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2007 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.