1 2 Previous Next 18 Replies Latest reply on May 31, 2017 12:58 PM by BruceRobertson

    Conditional formatting -

    btb01

      Strange question here ...I am trying to format color of a text box.  Goal is to have box be one of 4 colors (Red, Yellow, Green, Blue)

      I have the following conditional ..

      Formula is NewWatchlist:: Priority "CL"      Fill Color

      Formula is NewWatchlist:: Priority "P1"      Fill Color

      Formula is NewWatchlist:: Priority "P2"      Fill Color

      Formula is NewWatchlist:: Priority "P3"      Fill Color         

       

       

      notes ....

           P1 and P3  work fine (it turns box either green or red.

           P2 and P4 don't work i have checked and double checked that the only difference is the variable (P1-P3, CL) ---

           Order does not matter (I have moved the batting order and no impact

       

       

      any ideas?

      thanks

        • 1. Re: Conditional formatting -
          schamblee

          Formula should be self = "CL"

                                         self ="P1"

                                         self="P2"

                                         self="P3"

                                         self="P4"

          self can be replace with field name

          Dropbox - conditionalSample.fmp12

          1 of 1 people found this helpful
          • 2. Re: Conditional formatting -
            Mike_Mitchell

            The first thing to check is that your CF is actually set to format the field correctly. It's easy to duplicate a CF condition and forget to update the formatting.

             

            Beyond that, we'd need to look in more detail. The statements you have above aren't valid calculation formulas. A CF formula is a Boolean (either true or false), so you would need something like:

             

                 NewWatchlist::Priority = "CL"

             

            I would suggest you post a screen shot of your CF dialog so we can see exactly what's going on.

            • 3. Re: Conditional formatting -
              btb01

              I am having trouble pasting screenshot to this tool ...anyway

               

              Condition is checked (four lines -four boxes checked"

               

              Formula is New Watchlist::Priority = "P1"     Fill Color

              Formula is New Watchlist::Priority = "P2"     Fill Color

              Formula is New Watchlist::Priority = "P3"     Fill Color

              Formula is New Watchlist::Priority - "CL"     Fill Color

               

              ...at bottom --Condition "Formula is"    (and then one of the 4 above"

              Format   Fill color is checked

               

              does that help?

              • 4. Re: Conditional formatting -
                Mike_Mitchell

                Is the correct fill color associated with each calculation? Click on each one to check it.

                • 5. Re: Conditional formatting -
                  btb01

                  Thanks Mike --I checked each one and they each have a different (correct) color ...this seems so odd -- 2 work fine and two dont work at all. I have changed order, changed color --same result.  I deleted and re entered the ones that did not work and same result

                  • 6. Re: Conditional formatting -
                    schamblee

                    Order is not going to make a difference.  I included a sample in my previous post.   I used self but you can substitute the field name for self.     

                    • 7. Re: Conditional formatting -
                      Mike_Mitchell

                      Then something else is wrong. Either the values in the fields don't exactly match what you have in the CF, or there's a stray character in the CF formula. Or there's another CF that's interfering.

                      • 8. Re: Conditional formatting -
                        Mike_Mitchell

                        Uh ... pretty sure order does matter. They process from top to bottom, and all "true" conditions are applied. Since all 4 are fill color, the last true one will "win".

                        • 9. Re: Conditional formatting -
                          schamblee

                          Order is not going to make any difference in the above situation and is not going to cause the problem he is having.

                          • 10. Re: Conditional formatting -
                            btb01

                            still no joy (i re created from scratch --same result" 

                            One interesting new find --when i change the value of 1 that is working  it stops working (e.g. no color fill)  and even when I go back  it does not work (show up as desired color)

                             

                            I have tried using a list to limit acceptable values ---no impact

                            I have tried to change value (e.g. P1 to P2) --no impact

                             

                             

                            this seems really odd to me

                            • 11. Re: Conditional formatting -
                              erolst

                              Mike_Mitchell wrote:

                              Uh ... pretty sure order does matter. They process from top to bottom, and all "true" conditions are applied. Since all 4 are fill color, the last true one will "win".

                              But there is only one true condition, because they are mutually exclusive.

                              • 12. Re: Conditional formatting -
                                erolst

                                If the field in question is formatted as a chexbox oder radio button set, add another copy of the field to the layout and format it as an edit box, so the actual contents is not masked by a value list.

                                 

                                Another sanity check: is that "text field" really a text field, or maybe a number field?

                                 

                                And lastly, do you really want to test whether the contents of that field is identical to P1, P2 etc., or that it contains that string, among other text? If the latter, you need this expression:

                                 

                                PatternCount ( self ; "P1" )

                                1 of 1 people found this helpful
                                • 13. Re: Conditional formatting -
                                  Mike_Mitchell

                                  In this particular case, yes.

                                   

                                  The comment was meant to clarify that order does, by default, matter. The specifics of this case obviate it, but the OP should understand why it doesn’t matter, rather than assuming a universal “order doesn’t matter” rule.

                                  1 of 1 people found this helpful
                                  • 14. Re: Conditional formatting -
                                    erolst

                                    Yes, mom ... *rolleyes*

                                     

                                    Kidding aside , my comment "only one true" was directed at your description of that particular scenario with "Since all 4 are fill color, the last true" ...

                                    1 of 1 people found this helpful
                                    1 2 Previous Next