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

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

Recommended Posts

Posted

Check out the new “Tips-n-Trick” file just posted to the “Downloads” section of our web site, contributed by Mike Duncan, a Lead Developer at Excelisys, Inc.

FileMaker Pro 10 introduced native script triggers as a tool for developers to utilize in their solutions. This example demonstrates the usage of a search filter, which many FileMaker developers are familiar with in complex portal filtering solutions. Now, with the use of script triggers, it is simple enough to implement the same functionality but you are not restricted to displaying results in a portal, and therefore have much more flexibility in the interface. Instead of being required to set a complex key that drives a relationship, your search script can be as simple or exotic as your solution requires. One key difference available in FileMaker Pro 10 is that you no longer need to wait for a field to be exited in order to trigger an action, allowing interaction between the user and database not available before without the use of third party plug-ins.

This example is a simple implementation of script triggers by using the OnObjectModify trigger set on the global fields that are being used to provide search criteria on the sample data. As the user types search criteria, a search script gets run, narrowing the search results in real time. Also used in this demo is the new functionality to set a field by name. This is used to allow the user to select a field to search on, which is used to set the field by name that is searched. This sounds simple enough, and displaces the need for large, complex branching “if” statements in a script editor that might have duplicated this functionality in previous versions of FileMaker.

Since these fields wouldn’t be applicable in Find Mode, we also set an object with text that displays only when you are in Find Mode that alerts the user to this fact as a reminder, as well as graying out the filter fields. This is done using conditional formatting to change the appearance of text and layout objects that are dependent on the current mode.

http://tinyurl.com/dfy6dq

Script Triggers in FileMaker Pro 10 are an absolute game changer for developer in what they can accomplish. Hopefully this example provides a small peek at the potential that this new functionality provides.

Special thanks to Brian Dunning for providing the sample data used in this demonstration that is available at http://www.briandunning.com/sample-data/

Posted (edited)

Excellent - I coupled this with http://fmforums.com/forum/showtopic.php?tid/201295/ this technique to also SEARCH all Fields :

here is a quick demo....

http://screencast.com/t/bqBCCBrECm

Edited by Guest
×
×
  • Create New...

Important Information

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