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 Field Contents


There are many times, particularly with asset management databases, when it is particularly useful to export the graphic stored in a single field. You can cut and paste, of course, but that's awfully cumbersome if you want more than one field's contents. With FileMaker 7 comes a feature that allows you to export the current record to an external file with a single command. Embed this command in a script, and you can find a group of graphics that meet specific criteria, and export them to individual files.

To export the contents of one field to a file



1 .In the table containing the container field, go to a layout with the field to be exported.

2 .Click on the container field to select it (Figure 11.61).

Figure 11.61. Click the container field with the graphic to be exported.


3 .

Choose Edit > Export Field Contents.

4 .In the Export Field to File dialog box, specify a file name and destination folder (Figure 11.62). Click Save.

Figure 11.62. Give the exported file a name and choose a folder.



To export several records to different files



1 .

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

2 .

In the Define Scripts dialog box, click New. When the Edit Script dialog box appears, name the new script (we use Field Export).

3 .In the Navigation section of the script step list on the left, double-click Go to Layout.

4 .

In the Script Step Options section, select a layout that contains the field whose records you want to export to separate files (Figure 11.63).

Figure 11.63. Select any layout that has the container fields you need.


[View full size image]

5 .

Scroll down to the Found Sets section in the script step list, and double-click Perform Find.

6 .In the Script Step Options section, check Specify find requests (Figure 11.64). When the Specify Find Requests dialog box appears, click New.

Figure 11.64. Set the find criteria you'll use to locate the graphics.


7 .When the Edit Find Request dialog box appears, select the field you'll use to set your criteria from the "Find records when:" scrolling list.

8 .

Type the criteria for your selection in the Criteria section. In our example, we've set the Find criteria to be when the Artist is Cynthia Baron (Figure 11.65). Click Add, then OK twice.

Figure 11.65. You can use Edit Find Request to set and save your find criteria.


[View full size image]

9 .

Scroll up to the Control section in the script step list, and double-click Loop (Figure 11.66).

Figure 11.66. Use the Loop step whenever you want several steps to repeat.


10 .

While Loop is highlighted in the script-assembly list on the right, double-click If in the script step list on the left (Figure 11.67).

Figure 11.67. In this example, the If and End If steps must be inside the Loop.


[View full size image]

11 .In the Script Step Options section, click Specify. When the Specify Calculation dialog box appears, type not, followed by a space (Figure 11.68).

Figure 11.68. By adding "not" to a function, you invert its normal action.


12 .From the scrolling function list on the right, double-click IsEmpty.

13 .

With the field variable highlighted, double-click to select the field that contains your graphicsin our case, Image. Click OK to return to the Edit Script dialog box (Figure 11.69).

Figure 11.69. This calculation looks for records that contain images.


[View full size image]

14 .Scroll down to the Fields section in the script step list. Double-click Export Field Contents (Figure 11.70).

Figure 11.70. The Export Field Contents step automates the Edit > Export Field Contents menu option.


15 .In the Script Step Options section, check "Specify target field."

16 .When the Specify Field dialog box appears, select the same field you chose in step 13, then click OK. Leave "Specify output file" unchecked (Figure 11.71).

Figure 11.71. Specify a target field to export from the record.


If you specify an output file, each time a new record is found, it will replace the previous record that was exported.

17 .

Scroll up to the Navigation section of the script step list. Double-click Go to Record/Request Page.

18 .In the Script Step Options section, select Next from the Specify drop-down list. Check the "Exit after last" check box (Figure 11.72).

Figure 11.72. Check the "Exit after last" box to have the script end the loop after exporting the final record.


Selecting Next tells FileMaker to go to the next record in the found set.

19 .Click OK twice to finish.

When this script runs, it will go to a specific layout, find records that meet your criteria, and export all these records to separate files. The script will end when it finishes exporting the last record in the found set.



/ 227