Skip to main content
ben
Helper ⭐️⭐️⭐️
June 19, 2018
Solved

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

  • June 19, 2018
  • 3 replies
  • 70 views
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!
Best answer by rbegley
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.

3 replies

rbegley
rbegleyAnswer
Helper ⭐️⭐️
June 19, 2018
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.
ben
benAuthor
Helper ⭐️⭐️⭐️
June 19, 2018
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!
-Ben
kate_green
Helper ⭐️⭐️
June 20, 2018
Yep, I've used this with MIN as well to get the earliest of a group of dates. Works well!