5 Replies Latest reply on Jul 14, 2015 9:51 AM by MauriceG

    Displaying selected records from a portal



      Displaying selected records from a portal


      Hello all,

      I was able recently, with some great help from this forum, to create a portal that shows the number on books purchased by year. Now I'd like to be able to display in a layout the list of books purchased in a given year by clicking on the year in question in the portal. Do I need a script? If so, how should it be written? Some step by step explanations would be great. Attached is a screenshot of the portal.

      Thanks a lot.


        • 1. Re: Displaying selected records from a portal

          A description of your design would be helpful. You can't count on the person responding to have seen and remembered your previous thread.

          A generally effective way to do this is to put a button in your portal row that uses Go To Related Records to pull up the correct set of records as a found set. But the details will depend on the relationships behind this portal setup.

          • 3. Re: Displaying selected records from a portal

            Thanks Steve, I will review this document carefully. And PhilModJunk, here is the design you suggested back in June, which I put in place and which worked very well:

            Steve's Summary report recommendation is even simpler.

            But to respond to your request:

            I will call the table where you originally defined 21 fields, Dashboard and your table of bookpurchases, Books. We'll add a new table named PurchaseYears. In this table, you can define a number field named Year. If you do not already have one, define a calculation field with a number result type named cYearPurchased. It's calculation is simply: Year ( PurchaseDateFieldHere ).

            Your relationships:


            Dashboard::anyField X PurchaseYears
            PurchaseYears::Year = Books::cYearPurchased

            (In Manage | Database, you can double click a relationship line to get a dialog where you can change the = operator to the Cartesian join operator (x).)

            Create your 21 records in PurchaseYears and enter a different year into the Year field of each record. Now you can define a field in PurchaseYears named "cBookCount" defined as Count ( Books::cYear ). And you can then put a portal on the Dashboard layout that lists each record in PurchaseYears with cBookCount included in the portal row to show the count of books purchased in that year. When 2016 arrives, you just add another record to PurchaseYears and enter 2016 into the year field.

            • 4. Re: Displaying selected records from a portal

              A button in the portal row could perform this script step:

              Go To Related Record [Show only related records; From table: Books; Using layout: "Books" (Books) ]

              You can add a button to the portal row or select the field or fields in the portal row and use Button Setup from the Format menu to turn them into a button that you can click to do this. There's also an option in this script step to open a new window to display this set of records that you can use if you so desire.


              • 5. Re: Displaying selected records from a portal

                Tkx very much. Amazingly simple once you know how to do it.