syntax error

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
  • (Edited)
Syntax error for Max([Referral Date],[2nd Referral Date],[3rd Referral Date]) If(<[Most Recent Referral Date], null)

We are trying to leave a field blank if it is less than the "most recent referral date"field. This formula works for our max value between referral dates, but not for the If statement 
Photo of Shannon McFarlin

Shannon McFarlin

  • 92 Points 75 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

if(

max([referral date],[2nd referral date],[3rd referral date])<[most recent referral date],null, {else?}

)

Photo of Shannon McFarlin

Shannon McFarlin

  • 92 Points 75 badge 2x thumb

Thank you for such a quick response! 

That did not work.

First I copied and pasted your code as you sent it, it did not work. I ended up with the following:

Max([Referral Date],[2nd Referral Date],[3rd Referral Date])
If(
Max([referral date],[2nd referral date],[3rd referral date])<[most recent referral date],null,{else?})

It keeps giving me the following error: "There are extra characters beyond the end of the formula"

   
Photo of Shannon McFarlin

Shannon McFarlin

  • 92 Points 75 badge 2x thumb
Any ideas what could be wrong?
Again, thank you for your help!!!
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb

Hi,

The {else?} was a message to you to provide an else condition.

If you do not have an else condition, remove the , {else?} including that comma before the left brace, so that the code says, .... date],null )