1 Reply Latest reply on Dec 21, 2010 3:51 PM by philmodjunk

    How to create a self-join relationship

    JohnLucero

      Title

      How to create a self-join relationship

      Post

      I have seen many mentions of the value of using self-join relationships, but I can't find any information on how to form the relationship.  Its probably very simple.  Any help would be appreciated very much.

        • 1. Re: How to create a self-join relationship
          philmodjunk

          Say you have a category field where every record in your table stores either "animal", "Vegetable" or "mineral" and you want to see a list of all records with the same category as the current  record in a portal.

          In Manage | Database | Relationships, drag from YourTable::Category to outside the box and then back to the Category field before releasing the mouse button. Name this new "instance" of a table occurrence "SameCategory".

          You now have two occurences of the same data source table related by Category:

          YourTable::Category = SameCategory::Category.

          Now place a portal to SameCategory on your YourTable layout and you've created and implemented your first self join relationship.