• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 6. Creating Relationships > About Self-Relationships

About Self-Relationships

Not only can you relate one file to another, you can also relate records within a file to each other. This is called a self-relationship. There are lots of situations where self-relationships are useful. If you have a database of contact names, many of whom work for the same company, you can create a self-relationship in a portal to list everyone working for the same company on each individual employee's record. Self-relationship portals can be defined as buttons to switch between records. You can also use a self-relationship to do simple finds, create summary fields and even create lookups to speed up data entry.

To create a self-relationship:

Choose File > Define Relationships.

When the Define Relationships dialog box appears, click New.

In the Open File dialog box, double-click the name of the current file (Figure 6.49). In this case, the file is called Contacts.fp5.

Figure 6.49. To create a self-relationship, choose the current file name in the Open File dialog.

In the Edit Relationship dialog box, enter a relationship name.

In this example, we use the Company field, so we've named the relationship Company.

Click the same field in both field lists (Figure 6.50).

Figure 6.50. Choose the same field name in both field lists.

If it's not already checked, click the Sort related records check box. Click Specify to bring up the Specify Sort dialog box.

In this example, we'll set the Sort criteria to Last Name by double-clicking to choose it (Figure 6.51). Click OK, OK again and then Done.

Figure 6.51. You can choose any field to sort the relationship.



Not a subscriber?

Start A Free Trial

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