VISUAL QUICKPRO GUIDE FileMaker Pro 7 Advanced FOR WINDOWS AND MACINTOSH [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

VISUAL QUICKPRO GUIDE FileMaker Pro 7 Advanced FOR WINDOWS AND MACINTOSH [Electronic resources] - نسخه متنی

Cynthia L. Baron, Daniel Peck

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید











Importing Scripts


Scripts are often time-consuming creatures to develop. Although some are so tied to a single database file that you can only use them in one place, many, like the error trap script we created earlier, are basically modular. They could, with little effort, be put to work in numerous other files. Fortunately, FileMaker has an easy method of transferring developed and debugged scripts from their original database to a different one.

To import a script to a different database



1 .In the database where you want to import a script, choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).

2 .When the Define Scripts dialog box appears, click Import (Figure 10.40).

Figure 10.40. You can import scripts from other databases by clicking Import in ScriptMaker.


3 .

When the Open File dialog box appears, navigate to the FileMaker database that holds the script you want to import. Click Open.

4 .The Import Scripts dialog box will appear. Click the check box next to the script you want to importin our case, the Error Trap script (Figure 10.41). Click OK.

Figure 10.41. Import allows you to select several scripts at a time, even if they do not follow one another in the list.


5 .A warning message will appear (Figure 10.42). Click OK.

Figure 10.42. The warning message appears any time you import a script that specifies the name of a database, table, or field that does not appear in the file you are importing the script into.


FileMaker will automatically replace matching references to layouts in the old database with those in the new one. It will not change references in calculations, or those that call for differently named tables, even if the same field names exist in both databases.

6 .In the Define Scripts dialog box, make sure the imported script is highlighted. Click Edit.

7 .When the Edit Script dialog box appears, examine each line for references to the database you imported the script from. When you find one, highlight the script step.

8 .In Script Step Options for each step, specify the current database where the previous one is currently referenced (Figure 10.43).

Figure 10.43. Every step must specify the new database for the script to work.


Scripts that contain calculation fields that call missing tables or fields will put the entire calculation field within the comment symbol (/* */).

9 .

Look for steps that specify missing layouts and fields (Figure 10.44). In Script Step Options, specify layouts, tables, and fields in the current database.

Figure 10.44. Missing layouts are bracketed as <unknown>.


10 .Follow the steps in "To test a new script" on page 234, earlier in this chapter, to make sure that you've caught all the changed file and field references.


If you've made the changes carefully, your imported script should run flawlessly in the new database.

Tip

Once you've debugged a long and complex script, you can print it out, making it easier to locate a script that would be useful in a different database, or as a basis for a new script. It also makes it easy to reconstruct a complicated script if something nasty happens to your database and you have to resurrect it from an earlier version. You can print scripts individually or all at once by highlighting them in the Define Scripts dialog box and clicking the Print button (Figure 10.45).

Figure 10.45. You can choose to print all of the scripts in the database or just one.



/ 227