• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Lookups vs. Portals

Lookup fields copy data from one database into another, where it remains unchanged unless you update it manually. A lookup can contain only one record from the related file, whereas a portal can display any number of records from the related file. The portal does not copy the files into the master file, but simply displays them via a window (hence the name, portal) back to where the data resides in the related file. For that reason, portals require less storage space since the data remains in just one file. The portal is also “live” in that any change in the linked data is automatically reflected in the portal. There are times, however, when you don't want a live connection. Take, for example, an invoice where you want to preserve the cost of an item at the time of the sale. A portal to item costs would reflect the current price, not the sale price. In that case, a lookup would be better.

To define a lookup:

Open the database you want to be the master (destination) file. In either Browse or Layout mode, choose File > Define Fields (Figure 14.2).

Figure 14.2. To create a lookup field, choose File > Define Fields.

When the Define Fields dialog box appears (Figure 14.3), double-click on what you want to be the destination field—the one data will be copied to—and the Options dialog box will open.

Figure 14.3. Pick a destination field—the one you want data copied to—in the Define Fields dialog box.

When the Options dialog box appears, the Auto-Enter tab will already be active (Figure 14.4). Check Looked-up value, which will open the Lookup dialog box.

Figure 14.4. Checking Looked-up value in the Options dialog box will open the Lookup dialog box.

When the Lookup dialog box appears, use the pop-up menu to choose a relationship (Figure 14.5). (If no relationships have been defined, choose File > Define Relationships and see step 2 of To define relationships on page 230.) In this example, two databases, 3D and 3D vendor addresses, have been linked by matching the Vendor ID# field.

Figure 14.5. Use the Lookup dialog box to pick a field (Vendor) from the source file (“3D vendor addresses”) that you want to copy into the destination file (“3D”).

Once you define and choose a relationship from the pop-up menu, pick within the left-side list a source field, which is the field you want to copy data from.

Pick a match option from the If no exact match, then panel. Generally you'll use the default do not copy but you have the option of using the next lower or higher value, or even using a custom value. Also, leave Don't copy contents if empty checked to keep from generating empty lookup fields in your master file. Once you've made your choices, click OK.

When the Options dialog box reappears, click OK again. Finally, when the Define Fields dialog box reappears, click Done—and now you really are done.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint