4 Replies Latest reply on May 15, 2012 6:28 AM by MorkAfur

    Conditional Formatting Question

    MorkAfur

      Title

      Conditional Formatting Question

      Post

      I have a customer renewal date field.

      I want to show on the layout that the client's renewal date is within a month with a nice red, bold display.

      So, I set up a conditional formula on that renewal field with this value:

      Self≤(Get(CurrentDate) -30)

      I also set the field to be red and in "more formatting" checked bold.

      However, this doesn't work at all. None of the fields, even the ones within 30 days, are highligted red+bold.

      I figured this would be simple.

      What am I missing?

      Thanks,

      -- m

        • 1. Re: Conditional Formatting Question
          philmodjunk

          try:

          Self>(Get(CurrentDate) -30)

          and make sure that your field is of type date, not text.

          • 2. Re: Conditional Formatting Question
            MorkAfur

            Hmmm, this has the exact opposite effect: now all the dates are red and bold.

            I checked and the renewal field is marked date + indexed.

            I have a script that updates the date to the next year automatically if the date for this year has already passed, but that only runs when I go to a different layout.

            Not sure what's wrong here.

            The dates are in this format: 3/21/2012.

            Thanks,

            -m

            • 3. Re: Conditional Formatting Question
              philmodjunk

              It works for me, Dates more than 30 days in the past do not change color/style and dates 30 days in the past on through dates in the future appear in red.

              but I think you need a more complex expression and I don't know if "within 30 days" means 30 days into the past or 30 days into the future.

              One of the following is more likely to be what you want here.

              Self < Get ( CurrentDate ) and Self > ( Get ( CurrentDate ) - 30 )  // dates up to 30 days in past

              Self > Get ( CurrentDate ) and Self < ( Get ( CurrentDate ) + 30 )  // dates up to 30 days in future

              • 4. Re: Conditional Formatting Question
                MorkAfur

                Right, playing around with a play DB, this is what did what I wanted:

                self-Get(CurrentDate) > 0 and self-Get(CurrentDate) ≤ 30

                It's working now.

                Thanks again! :)

                -m