5 Replies Latest reply on Sep 2, 2016 7:28 AM by jjscarpetta

    Conditional Formatting Issue



      Mac OS 10.11.6

      MacBook Pro


      I have an issue where conditional formatting in a file I am working in is evaluating from the bottom to top instead of top to bottom. I have 2 fields, one called status ( text ) and the other called flag_invoice ( number ) . When an invoice is created it sets the flag_invoice to 1 so attached images show the conditional formatting and the output. If the status is "Open" it fills orange and invoiced fills green. Previously the status field wasn't being set to "Invoiced" but since that has been updated this isn't a problem with this scenario.


      I have tried it with another table in the file and choosing to random fields to add formatting on the button with the same results. I have not tested this in a another file as of yet.


      Screen Shot 2016-09-02 at 6.53.48 AM.pngScreen Shot 2016-09-02 at 6.54.42 AM.png

        • 1. Re: Conditional Formatting Issue

          I'm a bit lost in your explanation, but if this is true, then the result is correct:

          - flag_invoiced -> green fill

          - Open -> yellow fill.


          Then because the evaluation is done Top -> bottom and does not stop at first true test (it's not a switch/case statement), then, because the 2 formattings operate on the same attribute (fill), the last one wins.


          On the left, the test on Open comes last -> yellow

          on the right, the test on flag comes last -> green


          seems perfectly right to me.

          • 2. Re: Conditional Formatting Issue

            Sorry, my explanation wasn't great so based on what I originally wrote then yes you are right but according to FileMaker on conditional formatting it evaluates from top to bottom which makes the left fail. because it should make the left image green and the right orange. It's rare that I would use 2 different fields like this, most of the time it's the same field with different values so no issue. Just seemed odd.

            • 3. Re: Conditional Formatting Issue

              James, do you need an "AND" or "OR" condition in your formula based on the two fields tested?



              1 of 1 people found this helpful
              • 4. Re: Conditional Formatting Issue

                Not only according to FileMaker, but you have a good proof of it on your screenshots.

                I don't know how to explain it better. Let's try.


                On the left.

                t1 - FileMaker evaluates the 1st (top) condition : flag_invoiced = 1, which is True. So it fills the object with Green

                t2 - THEN FileMaker evaluates the 2nd (bottom) condition : status = "Open", which is also true, so it fills the object with Orange. (I would actually call this Yellow, but this is another discussion )


                Because Orange replaces Green (same attribute), you see Orange.

                Maybe, to understand try to add a font color formatting to your first (top) condition, and not to the 2nd. You'll see it applies as well.

                2 of 2 people found this helpful
                • 5. Re: Conditional Formatting Issue


                  That was it, in my mind it was working like a case statement and that is not the case so that with and AND clause and its good. 99% of the time I am only using the same field with different values.