4 Replies Latest reply on Apr 23, 2012 9:34 AM by philmodjunk

    sort toggle


      sort toggle


      I am trying to work out the best way to create a script to work like a sort toggle using alphabetical/date order/number order when a user clicks on one of the headers - see attachment to see the layout (the records are below but not in the screen grab.) Ideally I would also like the relevant header to change colour when it has been clicked. Would this be a conditional format or a new layout for each different find script..?


        • 1. Re: sort toggle

          "find script"?

          What does "find" have to do with sort?

          Can you confirm that these are records displayed in a portal?

          • 2. Re: sort toggle

            Please ignore the text that reads 'find' and 'find all'. I mean the headers beneath, such as, "company, equiry number" etc.. So if user clicks on, for example, 'company' then i would like the brown box behind the compsny text to go s little dsrker, and the records below to sort in aphabetical order, A to Z. if clicked again then I would like the reocrds to sort in Z to A... I hope that is clear...?


            • 3. Re: sort toggle

              Sorry - i didnt answer your questions. Not a portal. just a standard list view...not using a find script

              • 4. Re: sort toggle

                Then you do not have a tab control here, just buttons that look like tabs? That's what led me to ask about a portal here as a list view of your data isn't really compatible with tab controls.

                Assuming that this is a list view of the data where you have one record for each row of data....

                You can turn each colomn heading into a button to perfrom a script.

                Each script can have two steps:

                Set Variable [$$SortOrder ; "Company"]
                Sort Records [Restore ; no dialog] //specify a sort order that sorts on Company.

                Then you can use a conditional format expression on the layout text that's your column label for Company as:

                $$SortOrder = "Company"

                To specify a change in text color, fill color or both.