1 Reply Latest reply on Nov 28, 2014 3:16 PM by philmodjunk

    Button to sort portal records

    PeterDurant

      Title

      Button to sort portal records

      Post

      I am trying to sort portal records and setting up a button to change the sort order. I have a list of people on a street.  They are sorted, by default, to sort on street number in ascending order.  I would like to create a button to toggle between sorting from ascending to descending numbers and back again.  Can anyone help?  Thanks, Peter

        • 1. Re: Button to sort portal records
          philmodjunk

          Note: It IS possible to set up an unstored calculation field that serves as your sort field for the portal's specified sort order. The calculation refers to a global field that a script performed by your buttons can modify to reverse the sort order by changing the value of this field, but given just two possible sort orders, I think the following option is much simpler to implement:

          Add a tab or slide control to your layout. Put two copies of your portal into this control, one on each of the two Slide or Tab control panels. Make them identical except for the specified sort order selected in Portal Setup. To change sort orders, you select a different panel of the control. This can be done by clicking the tab control labels or the "slide" controls of a slide control, but you can also give each panel an object name and set your buttons to use go to object to select the appropriate panel with it's specified sort order. With this second option, you can make the borders and fill color of the control invisible and position the two portals with identical positioning to create the illusion that your mouse click is re-sorting the portal.

          Caulkins Consulting, Home of Adventures In FileMaking