New In Version 9 / Server Side Scripting
Subtitles of the Movie
In this movie, we'll take a look at the new server-side scripting capability introduced in FileMaker Server 9 and FileMaker Server 9 Advanced. This capability allows the script to be run by the server rather than it being required to be run by a FileMaker Pro client connected to the server. In order to utilize this capability, there are certain requirements that each script must meet. So we'll go into the ScriptMaker dialog and take a look at the test server-side script, which consists of six steps: go to layout, create new record or request, export field contents, save records as pdf, show custom dialog and replace field contents. In order for the script to be run successfully from the server-side, each and every step must be web compatible; otherwise an error will occur when the script is attempted to be run. So in the lower left-hand corner, we'll check the option to indicate web compatibility and as you see, three steps, the export field contents, save records as pdf and show custom dialog features are grayed out, meaning that they're not accessible. The last step, replace field contents, indicates that if it is performed with the dialog option, it is not compatible. So we'll select that step and tell it to perform without dialog. Now it would be compatible and this script could be run successfully from FileMaker Server. So it'll ask us if we want to save it, we'll tell it yes and now we'll bring up the server Admin Console and the first thing, of course, we do is check up here to make sure that the console, the database server is running and that the Web Publishing Engine is running. So we check the schedules option and we tell it to create a new schedule and the type schedule is to run a script. Next we tell it that we want to run a ScriptMaker script rather than a system-level script. So here we see a number of files that are being hosted by FileMaker Server and so let's just take the FileMaker Server sample and you notice we have the option of accessing this database when the script is run either with the guest account, the guest account of course must be enabled, or we could simply access it with a particular account name and password. And it's important to note that the privileges assigned to this particular account name and password could affect whether the script runs correctly or not. So a recommendation might be to create an account specifically for running server-side scripts. If we enter an incorrect account name and password, FileMaker Server will tell us it is invalid and that we need to utilize another one. So in this instance we'll simply do that and move to the next step. Having selected the sample file, we are now presented with a list of scripts that are available in that file to the account that we selected. So we'll just take this one, go to form layout and you notice that we have the capability of passing a parameter to that script and we'll just create a parameter. We then go to the next step and here you see we have the option to schedule the frequency that the script runs and it can be daily, every given number of days, one time only, weekly with a start date and an end date and FileMaker very conveniently provides us with the traditional pop-up calendar interface to select the dates. We are able to select a start time and we have other options for intervals. So having picked an appropriate schedule and in this instance we'll just leave it daily starting at this particular time, we'll then move to the next panel where we can give the script and the schedule a name and we'll just call this the test script. We move to the next page and here we have the option, which we will not select at this instance, of sending an email to the administrator to report on the particular running of the script. We'll then move to the next panel and as you see here, we have a summary of what we have selected. We have the schedule name, we have the database that is hosting the script, we have the script name, we have the parameter, the frequency, the start and the end date, the repeat cycle and information about email notification. It's important, of course, that we check this particular option, enable this schedule. So now we're finished and it brings us back to the beginning of the schedules window and here we see our test script. Here we can disable it selectively and it gives us some additional information about it when we select it or, of course, if we select the top most option, it will disable all of the schedules. So you nee to make sure that you've properly selected these options. So let's review a little bit what we've learned in this movie. We've learned that server-side scripts are now available in FileMaker Server 9 and Server 9 Advanced and that such scripts must have all of their steps as web compatible, otherwise they will generate errors at run time. We've shown how to set up a ScriptMaker script to run server-side, including naming the script, assigning the account under which it's to be run and remembering that the privileges attached to that account can influence the behavior of the script. We've see how to schedule the frequency for the running of the server-side script. We've see that we're able to pass a parameter to the script and we've seen that there's a summary screen at the end that allows us to review all of our selections. the running of the server-side script. We've see that we're able to pass a parameter to the script and we've seen that there's a summary screen at the end that allows us to review all of our selections.
Tutorial Information
| Course: | FileMaker Server 9 |
| Author: | Steven H. Blackwell |
| SKU: | 33886 |
| ISBN: | 1-934743-73-9 |
| Release Date: | 2008-06-20 |
| Duration: | 7 hrs / 86 lessons |
| Captions: | Available on CD and Online University |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 70,000 Video Tutorials (14,250 free)
- Video Available as Flash or QuickTime
- Over 650 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 