Skip to main content
Question

Multiple If Statements in conditional formatting

  • February 10, 2021
  • 0 replies
  • 70 views

Hello!

I am doing a conditional formatting field which I am calling "Visual status".  I am using this field to alert me to key issues with records in my system visually.

I have developed the following code:

var text red = "<img src=https://images.quickbase.com/si/24/221-point_red.png>";
var text yellow = "<img src=https://images.quickbase.com/si/24/223-point_yellow.png>";
var text green = "<img src=https://images.quickbase.com/si/24/222-point_green.png>";



If(
[Required BOM Release Date]<Today(),$red, Today()-Days(10) < [BOM Yellow Date] ,$yellow
)



What I am looking to do now is add a multiple If statement that looks at 1 more field.  The new field I have added is [BOM Release Date].  This is the actual BOM release date.  What I am trying to figure out is to take into account the actual BOM release date so that my current formula won't turn yellow or red once I get closer to "Today()".  The way my current formula is written once my Required BOM Release Date approaches, the record turns red regardless if my team put a BOM in place or not.


Thank you for your assistance!


Andrew

------------------------------
Andrew Andrew
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
Can you say in words what do you want the logic to be for your formula. If you can see it we can help you with the formula.  You were kind of vague about the date getting close.

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------

Forum|alt.badge.img+15
  • Registered
  • February 10, 2021
Andrew,

This could get complicated based upon the order that you want something to happen.  If you flow chart it first, then it is easier to build the If Statements.  However if your Bill of Materials is released this might solve your issue:

If (  [BOM Release Date]<>"", $green,
      [Required BOM Release Date]<Today(),$red,
      Today()-Days(10) < [BOM Yellow Date] ,$yellow, "")

If Operations has released the BOM you will be Green even if it was late.  The last part might not be acceptable for your business logic.


------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------