Discussions

Expand all | Collapse all

Formula If([Date of Request])?

Lynne8817 Lynne881703-26-2018 17:05

QuickBaseCoach Dev./Training03-27-2018 00:02

  • 1.  Formula If([Date of Request])?

    Posted 03-26-2018 17:05
    If date of request is less that today + 2 future days, I need my row to be red.  The formula I am using is not working.  Please advise.thx


  • 2.  RE: Formula If([Date of Request])?

    Posted 03-26-2018 17:05
    Update...is 2 days or more


  • 3.  RE: Formula If([Date of Request])?

    Silver
    Contributor
    Posted 03-26-2018 17:11

    If([Date of Request]<[TodayPlus2],"#CC0000","")

    in another formula date field called [TodayPlus2], do the following:

    Today()+Days(2)



  • 4.  RE: Formula If([Date of Request])?

    Top
    Contributor
    Posted 03-26-2018 18:10
    If the date is 2 days or more in the future, it will be the HEX color you pick.

    If([Date of Request]>=(Today()+Days(2)), "#HEX", "")


  • 5.  RE: Formula If([Date of Request])?

    Posted 03-26-2018 19:59
    Neither of these are working the way I have intended. I probably didn't explain well enough and have come up with something more...

    If my [date of request] is more than 2-5 days prior to today, "yellow",
    If my [date of request] is more than 6-10 days prior to today, "blue",
    If my [date of request] is more than 11 or more days prior to today, "red"

    Thank you for reviewing this again.  


  • 6.  RE: Formula If([Date of Request])?

    Top
    Contributor
    Posted 03-26-2018 20:54
    If(
    [Date of Request]>(Today()+Days(1)) AND [Date of Request]<(Today()+Days(6)), "yellow",
    [Date of Request]>(Today()+Days(5)) AND [Date of Request]<(Today()+Days(11)), "blue",
    [Date of Request]>(Today()+Days(10)), "red",
    "")


  • 7.  RE: Formula If([Date of Request])?

    Posted 03-26-2018 23:44
    not working.  I get an "expecting ," alert.  Nothing gets colorized.  We will keep trying?  thx


  • 8.  RE: Formula If([Date of Request])?

    Posted 03-27-2018 00:02
    Please post your formula which is not working


  • 9.  RE: Formula If([Date of Request])?

    Posted 03-27-2018 14:00
    If(
    [Date of Request]>(Today()+Days(1)) AND [Date of Request]<(Today()+Days(6)), "yellow",
    [Date of Request]>(Today()+Days(5)) AND [Date of Request]<(Today()+Days(11)), "blue",
    [Date of Request]>(Today()+Days(10)), "red",
    "")

    Line 2 has alert symbol - the word "AND" is highlighted in yellow and the alert message reads:
    column 36 > Expecting ,

    Thx


  • 10.  RE: Formula If([Date of Request])?

    Silver
    Contributor
    Posted 03-27-2018 14:29
    Hi Lynn,

    I have just checked this formula and found the same error which you have mentioned. Try to use in a small case - and not AND. it will work.


  • 11.  RE: Formula If([Date of Request])?

    Silver
    Contributor
    Posted 03-27-2018 14:30
    In fact, if you ignore that error and save it then, Quick Base will change it automatically from AND to and.

    If(
    [Date of Request]>(Today()+Days(1)) and [Date of Request]<(Today()+Days(6)), "yellow",
    [Date of Request]>(Today()+Days(5)) and [Date of Request]<(Today()+Days(11)), "blue",
    [Date of Request]>(Today()+Days(10)), "red", "")

    I don't know why it is expecting , after the AND. I will report it out separately to the QB Support team about it.

    Thanks,

    Gaurav


  • 12.  RE: Formula If([Date of Request])?

    Posted 03-27-2018 14:50
    I copied and pasted the formula, however none of the rows are colored.


  • 13.  RE: Formula If([Date of Request])?

    Posted 03-27-2018 14:58
    Let's try a different approach.  I have calculated the days "overdue" (duration field).  Need a formula for:
    2-5 days overdue, blue
    6-10 days overdue, yellow
    11 or more days overdue, red


  • 14.  RE: Formula If([Date of Request])?

    Silver
    Contributor
    Posted 03-27-2018 17:21
    > I copied and pasted the formula, however none of the rows are colored.

    May be your report doesn't have any matching criteria as per condition. Can you please check that. or

    try out this formula.

    If(
    [Date of Request]>(Today()+Days(2)) and [Date of Request]<(Today()+Days(5)), "yellow",
    [Date of Request]>(Today()+Days(6)) and [Date of Request]<(Today()+Days(10)), "blue", [Date of Request]>(Today()+Days(11)), "red", "")

    Do let me know if this formula works for you.