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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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











Exporting Records in a Script


In Chapter 5, we showed you how to export data for a spreadsheet or accounting program. You can use a script to organize your data for export by different criteria, as well as to export only selected records.

To specify export settings in a script



1 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S).

2 .When the Define Scripts dialog box appears, click New.

3 .When the Edit Script dialog box appears, type a name in the Script Name box. We use Export by Payment.

4 .

In the step list on the left, scroll down to the Records category and double-click Export Records (Figure 7.40).

Figure 7.40. The Export Records step contains all the options you need to automate the export process.


5 .In the Script Step Options section, check the "Specify output file" check box to choose a file name that will be used for the export file (Figure 7.41).

Figure 7.41. If you check "Specify output file," you can set a file name that will be used every time the export script runs.


6 .When the Specify Output File dialog box appears, click Add File (Figure 7.42). When the Export Records to File dialog box appears, give the file a name, and specify where the file should be stored. If you don't specify a file name, you'll be prompted for one when the script runs.

Figure 7.42. In the Specify Output File dialog box, you can set an output file on a local or a network drive.


7 .

From the Type drop-down list, select the type of text export for the file. In our example, we've selected Tab-Separated Text. Click Save (Figure 7.43).

Figure 7.43. Set the way the exported data will be formatted by selecting the type of file from the drop-down list.


8 .Click OK to return to the Edit Script dialog box.

9 .In the Script Step Options section, check the "Specify export order" check box.

10 .When the Specify Field Order for Export dialog box appears, select a field from the field list on the left. Then click Group By to use this file to organize your exported records (Figure 7.44).

Figure 7.44. By grouping the data in advance, the exported file will need less massaging later.


[View full size image]

In our example, we select Payment to organize our fields by the type of payment method (checks, credit card, purchase order or cash) customers used to pay invoices.

11 .From the field list on the left, double-click the fields that you want to export to the new file (Figure 7.45).

Figure 7.45. Select the subset of fields you want to export, or click Move All to select all fields.


[View full size image]

12 .If you are exporting a file that will be read on a different platform than the one you are working on, select the destination platform from the "Output file character set" drop-down list in the Options section (Figure 7.46).

Figure 7.46. Ensure that the correct character set will appear in your exported data.


[View full size image]

13 .

Click OK to return to the Edit Script dialog box. The script step will display the name and file type of the export file. Click OK twice to finish.

You can repeat these steps to create new exports and their associated scripts.


Tips


Because FileMaker can build sophisticated relationships between different tables, it can also use data from these related tables in an export.

You can change the file name you specify for your export script at any time by returning to ScriptMaker and editing the script. First, highlight Export Records in the Edit Script script-assembly list. In Script Step Options, click the Specify button to the right of the "Specify output file" check box (Figure 7.47). This brings up the Specify Output File dialog box again, allowing you to select a new file name.

Figure 7.47. Clicking Specify lets you choose a different file name for your export file.


Once you've created several export sub-scripts, you can combine them into a master script to create and export different sets of data. For example, at the end of a quarter you might need to export your account sales data both to an accounting program and an Excel spreadsheet. A master script allows you to export the same data in both formats at the same time. To do this, follow the steps in "To create a master script" on page 153 to create a script that uses a series of Perform Script steps (Figure 7.48).

Figure 7.48. The combined master script will find and then export each set of records separately.


[View full size image]


/ 227