3 Replies Latest reply on Jan 3, 2012 10:09 AM by philmodjunk

    Creating a portal to show multiple records from the current table

    MatthewKingham

      Title

      Creating a portal to show multiple records from the current table

      Post

      Hi, I thought this would be easy to achieve but apparently it's not, any help would really be appreciated.

      At the moment I just have 1 Customers table. On the layout (that is based on Customers) I want to have a portal that lists all of the customers. Then once you click on a button in the portal, all the other records will show up on the side.

      What's the easiest way to go about this? Cheers.

        • 1. Re: Creating a portal to show multiple records from the current table
          Sorbsbuster

          Sorry, I don't really understand this: "Then once you click on a button in the portal, all the other records will show up on the side"

          Do you mean that the left side of the screen, say, will be a Form View of one customer's record, and the right side will be a portal showing all the records in the table?

          If that is the case then simply define a cartesian self-join relationship from Customers to Customers (use the 'X' operator on any pair of fields) and draw the portal on that relationship.

          • 2. Re: Creating a portal to show multiple records from the current table
            MatthewKingham

            Yes I meant 'record' instead of 'records'.

            On which table/layout should I draw the portal?

            Thanks for your help.

            • 3. Re: Creating a portal to show multiple records from the current table
              philmodjunk

              In Manage | Database | Relationships, select the "box" (Called a table occurrence) for customers, then click the duplicate button (two green plus signs). Double click the new occurrence box and change its name to AllCustomers. This is a second reference to the same table so that we can set up Sorbsbuster's cartesian self join.

              Drag from Customers::anyfield to Allcustomers::anyfield to create a relationship. Then double click the line this action created to open a dialog box where you can select the cartesian join operator (x) to use in place of the default (=) operator.

              This gives you:

              Customers::anyfield X AllCustomers::anyfield   (it doesn't matter what field you choose for "anyfield" here in this relationship.)

              On your Cutomers layout, add a portal to AllCustomers to display a list of all the customer records. This script can be used for your portal button:

              Go To Related Records [From Table: "AllCustomers" ; Using Layout <Current Layout>]