Is this the correct use of the Case function and/or is there a better way to do this?

  • 0
  • 1
  • Question
  • Updated 6 months ago
  • Answered
Admittedly, I may be completely wrong in my approach here, but I'm trying to create a formula using the Case function that does this:

If there's a value in [Created Date], return that value, or if there's a value in [Activity Date/Time], return that value, else return the value in [Date Created].

(NOTE: There is never a case where there would be a value in both the [Created Date] and [Activity Date/Time].)

Below is the formula I've tried using "Formula Date" field and also using a "Formula Date / Time" field:

Case (not isnull([Created Date])), [Created Date], (not isnull([Activity Date/Time])), [Activity Date/Time], [Date Created])

In both cases, I get this error: the first "isnull" is highlighted in yellow and the message is "expecting date".

Is this the correct use of the Case function and/or is there a better way to do this?
Photo of Donna Troestler

Donna Troestler

  • 324 Points 250 badge 2x thumb

Posted 6 months ago

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

QuickBaseCoach App Dev./Training, Champion

  • 51,546 Points 50k badge 2x thumb
IF(
not isnull([Created Date]), [Created Date],
not isnull([Activity Date/Time]), [Activity Date/Time],
    [Date Created])
Photo of Donna Troestler

Donna Troestler

  • 324 Points 250 badge 2x thumb
That works! (of course) Thank you so much. :)