Can you make a rule to compare dates to choose the most recent?

  • 1
  • Question
  • Updated 3 months ago
  • Answered
We are FINALLY getting access to the last login date for users into our community. This has always been there, but is now being logged to Salesforce. How exciting!

Obviously, I want to incorporate this into our Health Scoring scheme as soon as possible. The date itself will be stored in a field on the Contact object. My goal would be to compare the last login date of select Contacts on an account and find the "Most Recent Community Login Date" for that overall Account.

I am guessing this can be done with a Bionic Rule. Has anyone accomplished this, and if so, can you provide guidance?

Thanks!
Photo of Ben

Ben, Champion

  • 8,074 Points 5k badge 2x thumb
  • excited

Posted 3 months ago

  • 1
Photo of Rob Begley

Rob Begley, Official Rep

  • 1,328 Points 1k badge 2x thumb
Ben,

You will need to query the Contacts and set your show fields to Account ID and MAX Most Recent Community Login Date.

This will return a dataset with the MAX date by Account.

Hope this helps.
Photo of Ben

Ben, Champion

  • 8,074 Points 5k badge 2x thumb
MAX, that is genius Rob. Sometimes it is hard to know what these operators due depending on the data set (i.e. MAX of a date = most recent). Thanks for interpreting!
Photo of Kate Green

Kate Green, Champion

  • 5,706 Points 5k badge 2x thumb
Yep, I've used this with MIN as well to get the earliest of a group of dates. Works well!