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

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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











Defining a Match Field


To define a table as either source or receiver, you need to create a key fieldwhich FileMaker calls the match fieldthat is com mon to both tables. Each record in the source table must have a unique match field, so that the receiving table can identify which record is which.

There can only be one instance (record) of a match field in the source table, whereas there can be any number of occurrences of it in the current table. This is referred to as a One-to-Many relationship. So, in our example tables, the sales table may contain many records with a customer's unique ID number, but there can only be one record in the Customer table that has that same ID.

The most common method for creating a match field is to create a serial number field using the Auto-Enter field option to assign a sequential number to every new record you create.

To create a serial number match field



1 .

In the source file, choose File > Define > Database (Control+Shift+D/Command+Shift+D).

2 .

When the Define Database dialog box appears, click the Fields tab. Type a name for the match field, choose Number (Control+N/Command+N) in the Type drop-down list, then click Create. In this example, the field name is Key Serial. When you're done, double-click the new field name.

3 .When the Options dialog box appears, click the Auto-Enter tab. Click the check box for Serial number. If this is a new database without any existing records, click the box for "Prohibit modification of value during data entry" to prevent anyone from altering this field by mistake (Figure 6.5). If this is a table with existing records, leave this box unchecked for now. Click OK twice.

Figure 6.5. Prohibiting modification prevents the auto-entered value from being changed.


4 .If this is a new table without existing records, you've finished. If you are adding this field to a database that already has records in it, you'll have to add serial numbers to the existing records before you can enter new ones. Choose View > Layout Mode (Control+L/Command+L) to add serial numbers.

5 .

Drag the Field tool to the layout and choose your serial number field name from the scrolling list in the dialog box (Figure 6.6).

Figure 6.6. Add the serial match field to the layout so you can update existing records.


6 .

Choose View > Browse Mode (Control+B/Command+B).

7 .Click in the serial number field. Choose Records > Replace Field Contents (Control+=/ Command+=).

8 .

When the Replace Field Contents dialog box appears, click the "Replace with serial numbers" radio button (Figure 6.7). Leave "Update serial number in Entry Options" checked, and click Replace.

Figure 6.7. The Replace command allows you to update the beginning number in the auto-entry sequence.


The existing records now have sequential numbers in the serial number field, and the field definition has been updated to enter the next serial number with one higher than your last record.

9 .

Return to File > Define > Database (Control+Shift+D/Command+Shift+D). Click the Fields tab. Double-click the serial number field name.

10 .When the Options dialog box appears, choose the "Prohibit modification of value during data entry" check box. Click OK twice to finish.


Tips

Not all types of fields can be used as match fields. Container fields can't ever be match fields. Global and Summary fields can be used as match fields in the destination table, but not in the source.

A field must be indexed to work as a match field. Don't manually turn off indexing for fields used in relationships, or your relationships will no longer function.


/ 227