4 Replies Latest reply on Jun 28, 2017 7:56 AM by gofmp15

    Sorting a portal twice


      I have a portal in which one of the fields is a "STATUS FIELD" - There are 20 different types of status


      The portal is sorted by a customised value list which has 10 of the 20 different types of status.  If the status is the same for multiple records then it applies a secondary sort to a date field in descending order.


      What I need is to sort the remaining 10 statuses by descending date order regardless of their Status..


      The problem I'm having is that the secondary sort isn't being applied to any of the statuses that aren't in the customised value list.

        • 1. Re: Sorting a portal twice

          Try adding a calculated field that contains your status field and the secondary date field.


          Also you might consider using a report for this rather than a portal...  You could use a Card or Dialog and display the proper records in a report/list view sorting them however you like without the problem imposed by a portal.

          • 2. Re: Sorting a portal twice

            Thanks for the info.


            If I understand you correctly, this would mean having a separate layout for this information.  However, I need to have this info within the context of a different table/layout, plus the information needs to be adjusted.  I have only just upgraded to FM16, so need to explore the card option.


            I don't know if this helps but basically it's is a recruitment business.  The portal resides on the client screen showing candidate/Interview information.


            The Status field will show things like: Accepted, declined by client, going to Interview etc

            And the date field is the Interview date.

            • 3. Re: Sorting a portal twice

              Make a calculation field to use for 1st sort order instead of status field, like

              FilterValues(ValueListItems("";"value list name");status)

              This makes "remaining 10 statuses" to be empty.

              • 4. Re: Sorting a portal twice

                Portals are often unable to deliver the data in the manner we need it and so a report is often superior. I use reports for menus.


                The header and footers can be buttons that perform specific tasks that will be displayed in the report similar to what you are trying to get the portal to do.


                Create a report/list using the iPhone dimensions  (280x460) and try


                Your new script

                New Window Card top = 0 bottom = 0 your new layout

                perform find your requirements


                go to first rec

                scroll window home


                You can also use an iPad or PC layout