2 Replies Latest reply on Aug 15, 2014 9:46 AM by SteveFransen_1

    Display A Found Set In A Portal

    SteveFransen_1

      Title

      Display A Found Set In A Portal

      Post

           I've read a number of threads on found sets and portals but am still having trouble with a specific problem.

           To illustrate this I started with a new copy of the FileMaker Pro Advanced 13.0v3 "Invoices" starter solution. I created a new invoice and added one customer ("Vehicle Supply Inc" company name) and four products ("Car" manufactured by "Ford", "Car" manufactured by "Porsche", "Truck" manufactured by "Mercedes", and "Van" manufactured by "Chevy").

           I'd attach the database file at this state but I'm not sure if that's permitted here.

           Imagine this invoice includes hundreds of products. How can I change the portal on the "Invoice Details" layout to display a found set of products that meet multiple criteria that are set using a script attached to a button or script trigger?

           For example, in the portal I may want to see only "Car" products and exclude "Van" and "Truck" products. Or maybe I only want to see "Car" products manufactured by "Porsche".

           Thanks!

        • 1. Re: Display A Found Set In A Portal
          philmodjunk
               

                    How can I change the portal on the "Invoice Details" layout to display a found set of products that meet multiple criteria that are set using a script attached to a button or script trigger?

               Why would you want to do that?

               Invoice details is intended to list the items one customer is purchasing from you in a single sales transaction. It's not intended to be used as a way to "display" products.

               But if you worked with a portal to the Products table, you can either use a modified relationship where you edit a field used as an additional match field to show only products matching that value or you can set up a portal filter to produce the same result. The first option usually does not require any scripting at all.

               Example: You put a "Make" field in your invoice table and set up a relationship that links Invoices to a new Tutorial: What are Table Occurrences? of products by a "Make" field you add to products. You put the Invoices::Make field on your layout formatted with a value list of "Ford, Toyota, GM...." You put a portal to this occurrence of Products on your layout and now, when you select "Ford" in the Make field, only product records with "Ford" in their Make field appear in the portal. And no scripting was needed.

          • 2. Re: Display A Found Set In A Portal
            SteveFransen_1
                 

            Why would you want to do that?

            I used the "Invoices" starter solution only to illustrate my problem. It has a number of entities, attributes, and capabilities that are analogous to the data model and other requirements of the solution I'm building. By analogy, in my solution Customers are Patients, Invoices are Evaluations, and Products are Elements of their medical evaluation.

            I just tried your suggestion in that starter solution and it works exactly as you described. Now I'll try it in my solution.

                 Once again, thanks!