Group a record list by date

Certified Associate Developer

Hello, 
I'm currently building an audit history for my job. The way our client wants the history displayed is grouped by the date that the history action is created on. So that the list sometimes displays 1 action per timestamp and sometimes 2 or 3 actions by timestamp. We have found a way to do this but it is complicated. I get all the values in the histActionOn, then I uses union() to get only the unique values. From this point I can do more complex indexing to organize all the actions by date, or I can throw a a!queryRecordType() in a for loop and filter it by the histActionOn field. This gets exactly what I need. A record list with actions separated by date and time, but it's incredibly inefficient as it puts a query in a for loop. I'm sure there's a way to group all the actions by unique dates, but I don't know a way at this point. 

Any thoughts?

Thank you

Jason

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data