3 Replies Latest reply on Dec 15, 2015 6:29 AM by tcaldwell

    Sorting based on summary - descending and ascending

    tcaldwell

      In a script, I am sorting for a report based on a summary field in descending order,  greatest to least.  Is there a way to order by number vlaue descending but field name ascending? For example, my list appears:

       

               Green          8

                Blue           8 

                Yellow        3

                Orange       3

                Brown        3  

       

      I want it to appear: 

                Blue          8

                Green        8

                Brown       3

                Orange      3

                Yellow       3

      Any help appreciated.

        • 1. Re: Sorting based on summary - descending and ascending
          SteveMartino

          Did you simple try manually sorting the summary field by value descending (it is a number field, right) and name ascending

          • 2. Re: Sorting based on summary - descending and ascending
            keywords

            Quite so. In the Sort Records dialog you can sort by as many fields as you need to. FM then sorts from the top down. In the example shown the records will be sorted first by date, in descending order, then by FieldB, then FieldC, both in ascending order. Play around with these settings and I'm sure you will soon have what you want. If you then wish to save that report format for future use you can script it.

            Screen Shot 2015-12-15 at 7.05.24 am.png

            • 3. Re: Sorting based on summary - descending and ascending
              tcaldwell

              Thank you much for responding.I  did a poor job explaining what I am trying to accomplish...I have a layout with a subsummary.  I have two fields, one is a text field for the item, one is a number field to count the item.  The subsummary is based on the text field.  For the sort step, I have to use the item field to sort ascending, (alpahaetical) or use the item field "re-order based on sub-summary descending" (number order).  Since the number field I am using is a count field, it is not a sort option but is "greyed out".  I am trying to build a top ten list, largest number to smallest number, but when number value is the same, have the items be alphabetical.  Sorting the same field one way and then the other does not work.  What am I missing?

               

               

              #yiv5703322382 * #yiv5703322382 a #yiv5703322382 body {font-family:Helvetica, Arial, sans-serif;}#yiv5703322382 h1, #yiv5703322382 h2, #yiv5703322382 h3, #yiv5703322382 h4, #yiv5703322382 h5, #yiv5703322382 h6, #yiv5703322382 p, #yiv5703322382 hr {}#yiv5703322382 .yiv5703322382content p #yiv5703322382 .yiv5703322382content li #yiv5703322382 .yiv5703322382button td {}#yiv5703322382 .yiv5703322382footer #yiv5703322382 .yiv5703322382footer a

              |

               

               

              |

              Sorting based on summary - descending and ascending

              reply from keywords in Discussions - View the full discussionQuite so. In the Sort Records dialog you can sort by as many fields as you need to. FM then sorts from the top down. In the example shown the records will be sorted first by date, in descending order, then by FieldB, then FieldC, both in ascending order. Play around with these settings and I'm sure you will soon have what you want. If you then wish to save that report format for future use you can script it. https://community.filemaker.com/servlet/JiveServlet/downloadImage/2-529000-19622/ScreenShot2015-12-15at7.05.24+am.png

              Reply to this message by replying to this email, or go to the message on FileMaker Community

              Start a new discussion in Discussions by email or at FileMaker Community

              Following Sorting based on summary - descending and ascending in these streams: Inbox

               

              |

               

               

              Manage your email preferences

               

              FileMaker Developer Conference 2016 • Las Vegas, Nevada • July 18-21 • www.filemaker.com/devcon

               

                |