3 Replies Latest reply on Sep 2, 2015 12:35 PM by thurmes

    Conditional formatting by calculation


      Hi all, I need to format a field to show color when certain conditions are met. Basically, if the values of two fields in the active record meet certain criteria, then the field needs to show red.


      When looking at the conditional formatting window, I can select "Formula is", but then I don't know the syntax to write.


      Do I use a Get function to determine the value in a field? Is there another function?

        • 1. Re: Conditional formatting by calculation

          A little more detail-  this is the condition which should trigger the field to show filled red-


          field1 = "SN" or (field2 = "SW" and field3 > "20")

          • 2. Re: Conditional formatting by calculation

            vtdonn wrote:

            field1 = "SN" or (field2 = "SW" and field3 > "20")


            Well, that syntax is correct – just replace field1 etc. with the field references, which you can get in the Edit Calculation dialog by double-clicking the field names in the field list.


            In the Calculation Engine (Edit Calculation dialog), a reference to a field (or a variable) is replaced with the value in that field when the formula is evaluated – so no need for GetField() or similar tricks here.

            • 3. Re: Conditional formatting by calculation

              What you've written should work. Of course, it's Table1::field1 = "SN", etc. Click on that formula in the Table of Conditions and assign the formatting you wish to see when the formula evaluates as true. If one of the fields you're checking is the field you're conditionally formatting, you typically use Self to refer to the contents of that field.