1 Reply Latest reply on Dec 31, 2014 11:08 AM by philmodjunk

    Portal showing only one record



      Portal showing only one record


      I have 3 tables: Venue, Artist, Offers. All have primary key/ids for each record.

      I have a layout in Offers the prints an itinerary (collection of offers). On the main Artist layout I have a button that runs a script that takes the current found set of records and generates a report using the Offer layout. It works great. Each offer is in the report.

      I ran into trouble when I decided to have a list of a few fields (Venue name, City, Performance Date) at the top of the report since each offer is about a page (sort of like a Table of Contents). I am trying to use a portal and his is where my ignorance begins to show.

      Since you can't have a portal relate to the table occurrence it is on, I created a second TO from the same Table (Offers2) based on primary key and created a portal showing related records from Offers2 and used fields from that TO in the portal. The portal

      Results are that I only see one line of data in the portal. In preview I see the first record's data in the portal. In browse I see the data from the record I am previewing.

      I read a bunch about this issue with solutions like custom functions and Global fields. Is that the direction I need to go? Attached pic shows the layout.


        • 1. Re: Portal showing only one record

          From what you posted here:

          I created a second TO from the same Table (Offers2) based on primary key and created a portal showing related records from Offers2

          It would seem that your portal is doing exactly what you designed it to do instead of what you want it to do. wink

          By definition, a primary key uniquely identifies each record in the portal. So a self join relationship like this that matches records by primary key fields can only match the current record to itself and thus you get only one record in the portal.

          Neither custom functions nor a global field seems needed here. Instead, you need to identify what value in what field stores a value that is common to all the Offers records and which is NOT common to any offers records you don't want to see. That is the field you should use as your match field in the relationship on which you base such a portal.

          But may I suggest an alternative?

          If you set up a list view layout, you can perform a find for the Offers records that you want and list them in the Body of the layout. Fields that hold the same data for every offer record in your set of found records can then be placed in the header, footer or a grand summary layout part to appear at the top or bottom of your list of Offers. This approach does not use a portal--making it much easier to list a widely varying number of offers records and does not require an added table occurrence for a relationship.