Conditional Formatting for an arriving due date - InfoPath Dev
in

InfoPath Dev

Conditional Formatting for an arriving due date

Last post 11-15-2011 01:30 PM by boltman. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-15-2011 01:03 PM

    Conditional Formatting for an arriving due date

    I'm unsure if this is the appropriate place for this post, but I have been racking my brain tyring to figure out how to apply conditional formatting to an InfoPath form I developed to track IT asset compliance with security patches.

    Simply put, I have a text box field with a compliance date titled "IAVA1_CD" (CD for compliance date). This field is read only and includes the date (mm/dd/yyyy) a patch must be applied by.  I also have two other text box fields titled "IAVA1_A" (# of systems affected) and "IAVA1_P" (# of systems patched), which allows a user to enter the number of systems affected vs those patched.  I want the "IAVA1_A" and "IAVA1_P" fields to be shaded yellow when it's a week out from the compliance date all the way up to the compliance date.

    I have figured out how to shade the field red when it's past the compliance date and to leave it clear if the compliance date is greater than the current date.  My boss wants an indicator for patches due within a week, and for those to show up yellow all the way up to the compliance date and to turn red after that date.

    Here are the current conditions I've applied in the correct order:

    IAVA1_A = IAVA1_P and IAVA1_A is not blank (shade green)

    IAVA 1_CD > today() (shade white)

    IAVA1_A is not equal to IAVA1_P (shade red)

    IAVA1_CD < today() (shade red)

    If anyone can assist me in finding a way to make the IAVA1_A and IAVA1_P fields to be shaded yellow when the compliance date is a week away, then I'll be able to keep my boss happy and you can feel satisfied knowing that I didn't waste a week's worth of time developing this form.  Kidding aside, I would greatly appreciate any help offered.  Thanks!

  • 11-15-2011 01:22 PM In reply to

    Re: Conditional Formatting for an arriving due date

    This should work:

    IAVA1_CD <= addDays(today(), 7)

    You might need to finagle the logic to get it to work with your other conditions.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-15-2011 01:30 PM In reply to

    Re: Conditional Formatting for an arriving due date

    Jimmy,

    I greatly appreciate the prompt and accurate response!  I was entering "-7" with the addDays function instead of "+7".  Can't thank you enough!

    -Derek

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.