Performing Scripts - File Maker

There are several ways to run scripts.

  • The first way is via the Define Scripts dialog; just highlight a script and click the Perform button. Because users usually don’t get access to the Scripts menu, this is more of a convenience for developers to run scripts this way.
  • Another way, as mentioned earlier, is to make a script available via the Scripts menu by checking the box next to a script’s name in Define Scripts. Again, not very intuitive to users except for perhaps some database-wide scripts like a global Back button.
  • But the most useful way for users to run scripts is via buttons on the layout.

In fact, in Company.fp5, the script you just created already exists as attached to a button in the database. To try it:

  1. Go to any company record and click the Reports button at lower right, then click the button above the words “Company Details”. The script runs!
  2. To leave the preview, click the Continue button on the status area. You are left on the report with access to one button that sends the report to the printer and another that returns you to the report menu.
  3. Now go back to the report menu and go into Layout mode. Double-click the report button to see how the script you created is attached to the button.

Scripts can also be run when a database opens or closes, as you learned with regard to document (database) preferences. Scripts can also be triggered via plug-ins, Apple Scripts, and ActiveX automation

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

File Maker Topics