How do I make a IF statement with another IF statement inside it?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Please help!

This is what I am trying to do. First, I have an "Expected Delivery Date" field. The goal being if it is in a certain status, it's 5 business days and otherwise it is 2. The formula is as follows:

If([Basis for Request]="New Client Launch Notice",WeekdayAdd([Date Requested],5),WeekdayAdd([Date Requested],2))

However, there is also a field on this form called [On Hold Date]. If [On Hold Date] is Null, I want to use the formula above. If [On Hold Date] is not null, I want to use the same formula as above but calculating from the [On Hold Date] field, not the [Date Requested] field.

I am new to QuickBase and Boolean statements in general, so if this is a really obvious answer, I apologize. But any help would be greatly appreciated!
Photo of Jay


  • 0 Points

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,824 Points 50k badge 2x thumb
Try this. It makes use of a formula variable to aid in readability of the formula.

var date StartDate = IF(IsNull([On Hold Date]), [Date Requested], [On Hold Date]);

If([Basis for Request]="New Client Launch Notice",WeekdayAdd($StartDate, 5),WeekdayAdd($StartDate, 2))