Solved

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

  • 19 June 2018
  • 3 replies
  • 42 views

Badge
  • Shoshin
  • 314 replies
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!
icon

Best answer by rbegley 19 June 2018, 21:10

View original

3 replies

Badge
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.
Badge
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!
Badge
Yep, I've used this with MIN as well to get the earliest of a group of dates. Works well!

Reply