• ArchAngeLJhed
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

I have seven different date fields on the contact object that I want to compare in order to find the most recent and then insert that into another custom field.

 

My current approach is not working as I am using several formula fields where each one consists of an IF statement that compares the previous formula field with one of the seven date fields and returns the greatest value.

 

For example:

 

Formula Field 1 = Comparing Date Field 1 with Date Field 2

Formula Field 2 = Comparing Formula Field 1 with Date Field 3

Formula Field 3 = Comparing Formula Field 2 with Date Field 4

And so on...

 

However I am now reaching a character limit on the compiled code (I'm guessing because it is going back through all of the previous IF statements and it becomes too large).

 

I have tried using the CASE() function but I still reach character limits.

 

Unfortunately the MAX() function only works with numbers, not date fields.

 

Does anyone have any advice how I could achieve my goal of finding the most recent date from a list of 7 fields?

 

Thanks,

 

Marco