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

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

Recommended Posts

Posted

I'm just curious as to the difference between the two scripted find methods that I have found while browsing example files and demos in Filemaker Pro.

The first method I was exposed is:


Enter Find Mode []

Set Field "Fieldx" (Find Criteria)

Perform Find []





vs.





Perform Find [RESTORE]

Taking in to account a fresh found set, is there any difference between the two? The second method seems cleaner to me but it seems less used than the first method.

Posted

The main difference is that Set Field[] can set the field to the result of a calculation.

An added bonus is that the criteria are visible when inspecting the script.

Posted

Are there any inherent disadvantages of using the first method over the second? Speed, etc...

Posted

Not that advice from comment ever needs a second opinion, but I always use method 1, because the criteria is visible in the script.

There are often "elegant" methods to accomplish something in FM, that bury your logic. Great when built, but often impossible to troubleshoot six months later. I try to avoid them.

Posted

Until FM11, you couldn't use Perform Find with a $variable, you needed to use Set Field[]. So out of habit I've always done the former. But I have started using the latter recently.

For clarity, I comment what the Find criteria are, just like I do for Sorts.

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