3 Replies Latest reply on Oct 18, 2014 7:46 PM by philmodjunk

    Sort Selection Count



      Sort Selection Count


      Hi Gurus,

      I want to ask your help, I have a Sort Selection key with a drop down values (Category-Material Name,Supplier,Manufacturer,Code)

      What I want is, in my List View when I click my Sort Selection Key and I choose Code, I want to get the number of count of all my Materials having the same Code.

      I have made a calculation (Countby_Code ;  Summary ; Total of ID_Constant (running with restart),when sorted by Material::Code) but it showing all the total of records that I have.

      Any help is highly appreciated.

      Thank you so much.

        • 1. Re: Sort Selection Count

          I think that there's something missing from your calculation example as what you have posted would produce a syntax error.

          Do you want to count all the records in your table with that value or all the records in your found set with that value?

          There are a number of methods that can be used to get your count, from relationships that match only to the records with that specified values, to using ExecuteSQL, to using a filtered one row portal with a summary field in the portal row.

          • 2. Re: Sort Selection Count

            Hi Phil,

            I want that if Im going to sort out my record using my drop down menu, it will summarize or give me the number of counts of each record.

            Now, if i will sort it gives me a wrong number of counts of each code.

            • 3. Re: Sort Selection Count

              A summary report lists records grouped by a common value--such as all records with the same value in your Code field. A sub summary layout part and a summary field are then used to show the count or other sub total type summary value based on all records in each such group.

              So this sounds like you want to sort (group) your records by a different field and thus get different counts in your summary report.

              If you add the right sub summary layout parts, you need only change the sort order for your found set of records to see different sub summary parts and their sub totals become visible.

              Here's a tutorial on summary reports: Creating Filemaker Pro summary reports--Tutorial