3 Replies Latest reply on Apr 17, 2012 10:47 AM by Tucker

    Conditional formatting from sort

    ThomasTimmann

      Title

      Conditional formatting from sort

      Post

      Hi, I have a database where I have made some superscripts to a button that sorts the records in a overview.

       

      Is it possible to fx. change the collor of the button when pressed, so users can see which sort is used for the view?

       

      Thanks in advanse

       

      TT

        • 1. Re: Conditional formatting from sort
          kapitaen_1
            

          you can make two global media fields.

           

          buttonfield1 contains button in first color

          buttonfield2 contains button in second color

           

          then make a calculated media field that contains either field1 or field2, dependant on the sorting you have  choosen

           

          and use this calculated field in your layout as button.

           

          greetings from germany

          chris 

          • 2. Re: Conditional formatting from sort
            philmodjunk
              

            If this is text, either layout text or the button's label text, you can apply a conditional format. Have your script set a value in a global field that identifies what sort order was applied. Then enter an expression for your conditional format that checks the contents of the field to determine what color, style etc. to apply.

             

            I do this trick with a list layout I have to change a column label to italics to show that it is the current sort field.

            • 3. Re: Conditional formatting from sort
              Tucker

               Phil - could you please provide an example of this?

              I have a button called Company. When selected the list sorts by company order. I want the text colour to change when the button has been selected.

              "Have your script set a value in a global field that identifies what sort order was applied." I do not understand.

              "enter an expression for your conditional format that checks the contents of the field to determine what color, style etc. to apply." An example of the script would be big help.

              Thank You.