3 Replies Latest reply on Jun 27, 2013 9:25 AM by philmodjunk

    Multiple conditional formatting on a portal

    DianeJohnson

      Title

      Multiple conditional formatting on a portal

      Post

           I  have a portal with a date field displayed on it. I am trying to apply two separate conditional formatting conditions to it. It is working in another part of the database, but not in the portal.

           If the date is less than 30 days from a preset date, I need it to be formatted orange. This is the formula I am using. 

           EmployeesPortal » People::%nextExchange  <  Date ( Month (Get ( CurrentDate )) ; Day ( Get ( CurrentDate ))  +  30; Year ( Get ( CurrentDate ) ))

           If the date is less than 7 days from a preset day, I need it to be formatted red. This is the formula I am using.

           EmployeesPortal » People::%nextExchange  <  Date ( Month (Get ( CurrentDate )) ; Day ( Get ( CurrentDate ))  +  7; Year ( Get ( CurrentDate ) ))

            

           The %nextExchange is a calculation that grabs the NextExchange date from the actual Exchange table. That table is sorted in descending order by date so that the %nextExchange calculation is the most current Exchange.

           If I place the 7 day condition first in the conditional format list, it seems to be evaluating for the 30 day condition, but will not display anything red for the 7 day condition.

           If I place the 30 day condition first in the conditional format list, it will format all conditions as if they are all true to the 7 day condition. Meaning anything less than 7 days and anything less than 30 days will format red.

           Any ideas?

        • 1. Re: Multiple conditional formatting on a portal
          philmodjunk

                Sounds like both expressions are evaluating as true all the time. Make sure that %nextExchange specifies Date as the result type.

               Your Date function calls seem to have omitted the year, but I am guessing that this is a typo as that should trigger an error message if you actually tried to set it up that way.

               PS, you can simplify your calcs by leaving out the date function call all together:

               People::%nextExchange  <  Get ( CurrentDate ) +  30

               Dates in FileMaker are really number fields that record the number of days from 12/31/0000 to the date shown/entered in the field and thus you can compute dates by adding and subtracting the number of days needed to compute the desired date.

          • 2. Re: Multiple conditional formatting on a portal
            DianeJohnson

                 Phil,

                 A huge thank you!!! Sometimes it is the most simple of solutions and I need just a few more brain cells than I have at the ready to get it done. As usual you swoop in immediately and provide the answer. It was the %nextExchange that was set to a number and not a date. Walah!

                 Thank you....

                 Diane

                 p.s. Thank you for the tip in shortening the date calculation. It's so much tidier.

            • 3. Re: Multiple conditional formatting on a portal
              philmodjunk

                   It also should evaluate a bit more quickly and this is nothing to sneeze at in FileMaker 12 solutions where screens tend to update more slowly than in version 11.